diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-21 13:46:55 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-21 13:46:55 -0700 |
| commit | 33ad3deaee06df288731064aa0663cb2806ebea0 (patch) | |
| tree | a4ce002d3928dc3edb8a266149ad152533a89c5a /node/Path.hpp | |
| parent | ba3f04deedb3a09e8683b2507b7c2176e87e3766 (diff) | |
| download | infinitytier-33ad3deaee06df288731064aa0663cb2806ebea0.tar.gz infinitytier-33ad3deaee06df288731064aa0663cb2806ebea0.zip | |
Builds with new Path code.
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 21ef71bb..960b08b3 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -111,12 +111,12 @@ public: Utils::snprintf(lrago,sizeof(lrago),"%lld",(long long)((_lastReceived != 0) ? (now - _lastReceived) : -1)); Utils::snprintf(lfoago,sizeof(lfoago),"%lld",(long long)((_lastFirewallOpener != 0) ? (now - _lastFirewallOpener) : -1)); Utils::snprintf(lpago,sizeof(lfoago),"%lld",(long long)((_lastPing != 0) ? (now - _lastPing) : -1)); - return (std::string(_tcp ? "tcp:" : "udp:") + _addr.toString() + "[" + lsago + "," lrago + "," + lpago + "," + lfoago + "," + (active(now) ? "active" : "inactive") + "," + (_fixed ? "fixed" : "learned") + "]"); + return (_addr.toString() + "[" + (_tcp ? "tcp" : "udp") + ";" + lsago + ";" + lrago + ";" + lpago + ";" + lfoago + ";" + (active(now) ? "active" : "inactive") + ";" + (_fixed ? "fixed" : "learned") + "]"); } - inline operator==(const Path &p) const throw() { return ((_addr == p._addr)&&(_tcp == p._tcp)); } - inline operator!=(const Path &p) const throw() { return ((_addr != p._addr)||(_tcp != p._tcp)); } - inline operator<(const Path &p) const + inline bool operator==(const Path &p) const throw() { return ((_addr == p._addr)&&(_tcp == p._tcp)); } + inline bool operator!=(const Path &p) const throw() { return ((_addr != p._addr)||(_tcp != p._tcp)); } + inline bool operator<(const Path &p) const throw() { if (_addr == p._addr) { |
