summaryrefslogtreecommitdiff
path: root/node/SelfAwareness.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-07 12:32:05 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-07 12:32:05 -0700
commit0a906818494814f308f1c6a0c208aa8ed76ef52a (patch)
treed1e012b6fe514282adbc8ec203333b53deab2f19 /node/SelfAwareness.cpp
parent24608d5ca300762ad3f6df34ea277ecc8ddbf6f6 (diff)
downloadinfinitytier-0a906818494814f308f1c6a0c208aa8ed76ef52a.tar.gz
infinitytier-0a906818494814f308f1c6a0c208aa8ed76ef52a.zip
Add ping(), and a logic fix in SelfAwareness.
Diffstat (limited to 'node/SelfAwareness.cpp')
-rw-r--r--node/SelfAwareness.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/node/SelfAwareness.cpp b/node/SelfAwareness.cpp
index 951c65e8..db0c5595 100644
--- a/node/SelfAwareness.cpp
+++ b/node/SelfAwareness.cpp
@@ -78,7 +78,9 @@ void SelfAwareness::iam(const InetAddress &reporterPhysicalAddress,const InetAdd
else {
Mutex::Lock _l(_lock);
InetAddress &lastPhy = _lastPhysicalAddress[scope - 1];
- if ((lastPhy)&&(lastPhy != myPhysicalAddress)) {
+ if (!lastPhy) {
+ lastPhy = myPhysicalAddress;
+ } else if (lastPhy != myPhysicalAddress) {
lastPhy = myPhysicalAddress;
_ResetWithinScope rset(RR,RR->node->now(),(InetAddress::IpScope)scope);
RR->topology->eachPeer<_ResetWithinScope &>(rset);