summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-23 10:27:53 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-23 10:27:53 -0700
commit86996d4315743a8295d05ad2cea1139c32337d2d (patch)
treed7cda3060ebc54a8289bfc34479712dede0ee743
parentd656e87395441b995d376c9174f3f0570cbf4396 (diff)
downloadinfinitytier-86996d4315743a8295d05ad2cea1139c32337d2d.tar.gz
infinitytier-86996d4315743a8295d05ad2cea1139c32337d2d.zip
Eliminate compiler warning.
-rw-r--r--node/Peer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 85874105..05b14da0 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -220,7 +220,7 @@ void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now)
attemptToContactAt(RR,bestPath->address(),now);
bestPath->sent(now);
} else if (((now - bestPath->lastSend()) >= ZT_NAT_KEEPALIVE_DELAY)&&(!bestPath->reliable())) {
- _natKeepaliveBuf += (uint32_t)now * 2654435761; // tumble this around to send constantly varying (meaningless) payloads
+ _natKeepaliveBuf += (uint32_t)((now * 0x9e3779b1) >> 1); // tumble this around to send constantly varying (meaningless) payloads
TRACE("NAT keepalive %s(%s)",_id.address().toString().c_str(),bestPath->address().toString().c_str());
RR->node->putPacket(bestPath->address(),&_natKeepaliveBuf,sizeof(_natKeepaliveBuf));
bestPath->sent(now);