From 6eb9289367a1c8661d38895558b0f01eac0ddd5e Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 3 Apr 2015 16:52:53 -0700 Subject: Bunch more cleanup, improvements to NAT traversal logic, finished updating Switch. --- node/Path.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'node/Path.hpp') diff --git a/node/Path.hpp b/node/Path.hpp index 1adb8f99..a5ee6aa9 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -106,7 +106,7 @@ public: * @param t Time of receive * @param d Link desperation of receive */ - inline void received(uint64_t t,int d) throw() { _lastReceived = t; _lastReceiveDesperation = d; } + inline void received(uint64_t t,unsigned int d) throw() { _lastReceived = t; _lastReceiveDesperation = d; } /** * @return Is this a fixed path? @@ -131,10 +131,10 @@ public: * @param now Current time * @return Path desperation, starting at 0 */ - inline int desperation(uint64_t now) const + inline unsigned int desperation(uint64_t now) const { if ((_fixed)&&(_lastSend > _lastReceived)) - return std::max(_lastReceiveDesperation,(int)((_lastSend - _lastReceived) / ZT_DESPERATION_INCREMENT)); + return std::max(_lastReceiveDesperation,(unsigned int)((_lastSend - _lastReceived) / ZT_DESPERATION_INCREMENT)); return _lastReceiveDesperation; } @@ -194,7 +194,7 @@ private: uint64_t _lastSend; uint64_t _lastReceived; InetAddress _addr; - int _lastReceiveDesperation; + unsigned int _lastReceiveDesperation; bool _fixed; }; -- cgit v1.2.3