aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-02-06 12:18:51 -0500
committerMatt Corallo <git@bluematt.me>2017-02-10 11:32:41 -0500
commitdb2dc7a58cb0a3df58188b748df8e0d04ba76f00 (patch)
tree061df504e100195d1dc93313652c9e2a1ecdc545 /src/net_processing.cpp
parent036073bf87c07f8d69e39168dd93a52f1aafe85c (diff)
Move CNode::addrLocal access behind locked accessors
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index b0c9b3c71b..7d76aa0b48 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1274,7 +1274,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::VERACK));
pfrom->nServices = nServices;
- pfrom->addrLocal = addrMe;
+ pfrom->SetAddrLocal(addrMe);
{
LOCK(pfrom->cs_SubVer);
pfrom->strSubVer = strSubVer;
@@ -1315,7 +1315,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
pfrom->PushAddress(addr, insecure_rand);
} else if (IsPeerAddrLocalGood(pfrom)) {
- addr.SetIP(pfrom->addrLocal);
+ addr.SetIP(addrMe);
LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
pfrom->PushAddress(addr, insecure_rand);
}