aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-05-10 00:39:49 +0200
committerCozz Lovan <cozzlovan@yahoo.com>2014-05-10 00:39:49 +0200
commitb641c9cd217f7789726bb25ab87cd35e2e5fcaad (patch)
tree705e5c8802f3ee6be7b7538dc362643e42a852b8 /src
parent605d5b55582f00ea8a089fe632cd8a52e951126b (diff)
Fix addnode "onetry": Connect with OpenNetworkConnection
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp3
-rw-r--r--src/net.h1
-rw-r--r--src/rpcnet.cpp2
3 files changed, 2 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 6bde1e7999..9f7096f133 100644
--- a/src/net.cpp
+++ b/src/net.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
//
diff --git a/src/net.h b/src/net.h
index 729b1bcd57..3a8cf1ac8f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -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()));
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 573d6cd3f6..0a2bfbac60 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -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;
}