Fix bug in peer count.

This commit is contained in:
Adam Ierymenko 2015-10-28 14:29:08 -07:00
parent 4c24e0cfb0
commit 68d6d3c4ff
3 changed files with 5 additions and 5 deletions

View file

@ -308,7 +308,7 @@ void Topology::clean(uint64_t now)
}
}
unsigned long Topology::countAlive() const
unsigned long Topology::countActive() const
{
const uint64_t now = RR->node->now();
unsigned long cnt = 0;
@ -317,7 +317,7 @@ unsigned long Topology::countAlive() const
Address *a = (Address *)0;
SharedPtr<Peer> *p = (SharedPtr<Peer> *)0;
while (i.next(a,p)) {
if ((*p)->alive(now))
if ((*p)->hasActiveDirectPath(now))
++cnt;
}
return cnt;