diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-03 16:52:53 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-03 16:52:53 -0700 |
| commit | 6eb9289367a1c8661d38895558b0f01eac0ddd5e (patch) | |
| tree | 32b239f50c446a52ab97de32f60708819f6078bc /node/Path.hpp | |
| parent | ee0f56355bd7b1d2798a750fb02a975b526dd9cf (diff) | |
| download | infinitytier-6eb9289367a1c8661d38895558b0f01eac0ddd5e.tar.gz infinitytier-6eb9289367a1c8661d38895558b0f01eac0ddd5e.zip | |
Bunch more cleanup, improvements to NAT traversal logic, finished updating Switch.
Diffstat (limited to 'node/Path.hpp')
| -rw-r--r-- | node/Path.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; }; |
