diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2014-06-04 15:00:38 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@bitpay.com> | 2014-06-04 15:00:38 -0400 |
commit | c79897af319e01d0c84f970206747e320e246418 (patch) | |
tree | 6ce65bc71e46c1ef23c339d83be9c42e32514ade /src | |
parent | f0f4904becbf2514c7cdc53a8942faf3982dda19 (diff) | |
parent | 53a088154ce4e1fc483afa120a9063811dd0e7ea (diff) |
Merge pull request #4247 from Diapolo/listen
rename fNoListen to fListen and move to net
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 4 | ||||
-rw-r--r-- | src/net.cpp | 3 | ||||
-rw-r--r-- | src/net.h | 1 | ||||
-rw-r--r-- | src/util.cpp | 1 | ||||
-rw-r--r-- | src/util.h | 1 |
6 files changed, 7 insertions, 7 deletions
diff --git a/src/init.cpp b/src/init.cpp index 3255f5bf10..6a21dee634 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -733,12 +733,12 @@ bool AppInit2(boost::thread_group& threadGroup) } // see Step 2: parameter interactions for more information about these - fNoListen = !GetBoolArg("-listen", true); + fListen = GetBoolArg("-listen", true); fDiscover = GetBoolArg("-discover", true); fNameLookup = GetBoolArg("-dns", true); bool fBound = false; - if (!fNoListen) { + if (fListen) { if (mapArgs.count("-bind")) { BOOST_FOREACH(std::string strBind, mapMultiArgs["-bind"]) { CService addrBind; diff --git a/src/main.cpp b/src/main.cpp index b1258839d0..fa47bf7f08 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3562,7 +3562,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (!pfrom->fInbound) { // Advertise our address - if (!fNoListen && !IsInitialBlockDownload()) + if (fListen && !IsInitialBlockDownload()) { CAddress addr = GetLocalAddress(&pfrom->addr); if (addr.IsRoutable()) @@ -4330,7 +4330,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle) pnode->setAddrKnown.clear(); // Rebroadcast our address - if (!fNoListen) + if (fListen) { CAddress addr = GetLocalAddress(&pnode->addr); if (addr.IsRoutable()) diff --git a/src/net.cpp b/src/net.cpp index b0e6699ed2..479f77c469 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -45,6 +45,7 @@ static const int MAX_OUTBOUND_CONNECTIONS = 8; // Global state variables // bool fDiscover = true; +bool fListen = true; uint64_t nLocalServices = NODE_NETWORK; CCriticalSection cs_mapLocalHost; map<CNetAddr, LocalServiceInfo> mapLocalHost; @@ -96,7 +97,7 @@ unsigned short GetListenPort() // find 'best' local address for a particular peer bool GetLocal(CService& addr, const CNetAddr *paddrPeer) { - if (fNoListen) + if (!fListen) return false; int nBestScore = -1; @@ -105,6 +105,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL); extern bool fDiscover; +extern bool fListen; extern uint64_t nLocalServices; extern uint64_t nLocalHostNonce; extern CAddrMan addrman; diff --git a/src/util.cpp b/src/util.cpp index 336ef31725..d106b03230 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -94,7 +94,6 @@ bool fPrintToDebugLog = true; bool fDaemon = false; bool fServer = false; string strMiscWarning; -bool fNoListen = false; bool fLogTimestamps = false; volatile bool fReopenDebugLog = false; CClientUIInterface uiInterface; diff --git a/src/util.h b/src/util.h index ffcb20d822..b09f9bb15e 100644 --- a/src/util.h +++ b/src/util.h @@ -100,7 +100,6 @@ extern bool fPrintToConsole; extern bool fPrintToDebugLog; extern bool fServer; extern std::string strMiscWarning; -extern bool fNoListen; extern bool fLogTimestamps; extern volatile bool fReopenDebugLog; |