summaryrefslogtreecommitdiff
path: root/node/SelfAwareness.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-01-06 11:38:11 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-01-06 11:38:11 -0800
commitff9317365a1d9498076b0971f0209fc2aec5c142 (patch)
tree108e2022662732946807a55fa61c4896780e590a /node/SelfAwareness.cpp
parentb8059d5c879ef02865198634679a7c04fda44949 (diff)
parent0a3ef38cade03c9b6a4f94611bd3df620ce1f4e6 (diff)
downloadinfinitytier-ff9317365a1d9498076b0971f0209fc2aec5c142.tar.gz
infinitytier-ff9317365a1d9498076b0971f0209fc2aec5c142.zip
Merge branch 'dev' into edge
Diffstat (limited to 'node/SelfAwareness.cpp')
-rw-r--r--node/SelfAwareness.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/node/SelfAwareness.cpp b/node/SelfAwareness.cpp
index ce75eb03..424a3cad 100644
--- a/node/SelfAwareness.cpp
+++ b/node/SelfAwareness.cpp
@@ -46,21 +46,19 @@ namespace ZeroTier {
class _ResetWithinScope
{
public:
- _ResetWithinScope(const RuntimeEnvironment *renv,uint64_t now,InetAddress::IpScope scope) :
- RR(renv),
+ _ResetWithinScope(uint64_t now,InetAddress::IpScope scope) :
_now(now),
_scope(scope) {}
inline void operator()(Topology &t,const SharedPtr<Peer> &p)
{
- if (p->resetWithinScope(RR,_scope,_now))
+ if (p->resetWithinScope(_scope,_now))
peersReset.push_back(p);
}
std::vector< SharedPtr<Peer> > peersReset;
private:
- const RuntimeEnvironment *RR;
uint64_t _now;
InetAddress::IpScope _scope;
};
@@ -121,7 +119,7 @@ void SelfAwareness::iam(const Address &reporter,const InetAddress &reporterPhysi
}
// Reset all paths within this scope
- _ResetWithinScope rset(RR,now,(InetAddress::IpScope)scope);
+ _ResetWithinScope rset(now,(InetAddress::IpScope)scope);
RR->topology->eachPeer<_ResetWithinScope &>(rset);
// Send a NOP to all peers for whom we forgot a path. This will cause direct