Significant simplification to path logic.

This commit is contained in:
Adam Ierymenko 2017-04-14 17:53:32 -07:00
parent 645bf4a764
commit 139c4b5633
6 changed files with 184 additions and 268 deletions

View file

@ -314,7 +314,9 @@ public:
Address *a = (Address *)0;
SharedPtr<Peer> *p = (SharedPtr<Peer> *)0;
while (i.next(a,p)) {
cnt += (unsigned long)((*p)->hasActiveDirectPath(now));
const SharedPtr<Path> pp((*p)->getBestPath(now,false));
if ((pp)&&(pp->alive(now)))
++cnt;
}
return cnt;
}