Work in progress...

This commit is contained in:
Adam Ierymenko 2019-08-22 13:06:08 -07:00
parent 0e18b14087
commit b66431bc29
No known key found for this signature in database
GPG key ID: 1657198823E52A61
15 changed files with 356 additions and 390 deletions

View file

@ -177,7 +177,7 @@ public:
Address *a = (Address *)0;
SharedPtr<Peer> *p = (SharedPtr<Peer> *)0;
while (i.next(a,p)) {
if (!(*p)->isAlive(now)) {
if (!(*p)->alive(now)) {
_peers.erase(*a);
}
}
@ -230,16 +230,13 @@ public:
Address *a = (Address *)0;
SharedPtr<Peer> *p = (SharedPtr<Peer> *)0;
while (i.next(a,p)) {
f(*this,*((const SharedPtr<Peer> *)p));
f(*((const SharedPtr<Peer> *)p));
}
}
/**
* Apply a function or function object to all roots
*
* Arguments to the function are this topology object, the root in
* question, and a pointer to the peer corresponding to it.
*
* This locks the root list during execution but other operations
* are fine.
*
@ -262,7 +259,7 @@ public:
_peers.set(rp->address(),rp);
}
}
f(*this,*i,rp);
f(*i,rp);
}
}