Skip to content
Permalink
Browse files

Fix addnode "onetry": Connect with OpenNetworkConnection

  • Loading branch information...
cozz committed May 9, 2014
1 parent 605d5b5 commit b641c9cd217f7789726bb25ab87cd35e2e5fcaad
Showing with 2 additions and 4 deletions.
  1. +0 −3 src/net.cpp
  2. +1 −0 src/net.h
  3. +1 −1 src/rpcnet.cpp
@@ -41,9 +41,6 @@ using namespace boost;

static const int MAX_OUTBOUND_CONNECTIONS = 8;

bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);


//
// Global state variables
//
@@ -49,6 +49,7 @@ void AddressCurrentlyConnected(const CService& addr);
CNode* FindNode(const CNetAddr& ip);
CNode* FindNode(const CService& ip);
CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL);
bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
void MapPort(bool fUseUPnP);
unsigned short GetListenPort();
bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
@@ -166,7 +166,7 @@ Value addnode(const Array& params, bool fHelp)
if (strCommand == "onetry")
{
CAddress addr;
ConnectNode(addr, strNode.c_str());
OpenNetworkConnection(addr, NULL, strNode.c_str());
return Value::null;
}

0 comments on commit b641c9c

Please sign in to comment.
You can’t perform that action at this time.