Browse Source

Merge pull request #4166

b641c9c Fix addnode "onetry": Connect with OpenNetworkConnection (Cozz Lovan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
1b7bcba1c1
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 3
      src/net.cpp
  2. 1
      src/net.h
  3. 2
      src/rpcnet.cpp

3
src/net.cpp

@ -41,9 +41,6 @@ using namespace boost; @@ -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
//

1
src/net.h

@ -49,6 +49,7 @@ void AddressCurrentlyConnected(const CService& addr); @@ -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()));

2
src/rpcnet.cpp

@ -166,7 +166,7 @@ Value addnode(const Array& params, bool fHelp) @@ -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;
}

Loading…
Cancel
Save