From dda376c9eb0800b824f423db30399d93e89cb162 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 28 Jul 2015 11:16:43 -0700 Subject: Nuke some abandoned code. --- node/Peer.cpp | 16 ---------------- node/SelfAwareness.hpp | 15 --------------- 2 files changed, 31 deletions(-) (limited to 'node') diff --git a/node/Peer.cpp b/node/Peer.cpp index ab3d61a6..2bfd421f 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -231,22 +231,6 @@ void Peer::pushDirectPaths(const RuntimeEnvironment *RR,RemotePath *path,uint64_ std::vector dps(RR->node->directPaths()); - // Push peer-reported surface -- tried this and it didn't help much with difficult NATs so commenting out. - /* - std::vector< std::pair > surface(RR->sa->getReportedSurface()); - for(std::vector< std::pair >::const_iterator s(surface.begin());s!=surface.end();++s) { - bool alreadyHave = false; - for(std::vector::const_iterator p(dps.begin());p!=dps.end();++p) { - if (p->address() == s->second) { - alreadyHave = true; - break; - } - } - if (!alreadyHave) - dps.push_back(Path(s->second,0,Path::TRUST_NORMAL)); - } - */ - #ifdef ZT_TRACE { std::string ps; diff --git a/node/SelfAwareness.hpp b/node/SelfAwareness.hpp index 1b160a3f..4eede592 100644 --- a/node/SelfAwareness.hpp +++ b/node/SelfAwareness.hpp @@ -66,21 +66,6 @@ public: */ void clean(uint64_t now); - /** - * @return List of external surface addresses as reported by peers - */ - inline std::vector< std::pair > getReportedSurface() const - { - std::vector< std::pair > r; - { - Mutex::Lock _l(_phy_m); - r.reserve(_phy.size()); - for(std::map< PhySurfaceKey,PhySurfaceEntry >::const_iterator p(_phy.begin());p!=_phy.end();++p) - r.push_back(std::pair(p->first.reporter,p->second.mySurface)); - } - return r; - } - private: struct PhySurfaceKey { -- cgit v1.2.3