summaryrefslogtreecommitdiff
path: root/node/Topology.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-04-14 17:53:32 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-04-14 17:53:32 -0700
commit139c4b56337c0cfe7458ecf5df4e12e38c2d4f8a (patch)
treefa374c70645e5aade9d255d3f9bb3ab978bbe958 /node/Topology.hpp
parent645bf4a764e6240bb7f36683aa739505f40b9cce (diff)
downloadinfinitytier-139c4b56337c0cfe7458ecf5df4e12e38c2d4f8a.tar.gz
infinitytier-139c4b56337c0cfe7458ecf5df4e12e38c2d4f8a.zip
Significant simplification to path logic.
Diffstat (limited to 'node/Topology.hpp')
-rw-r--r--node/Topology.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/node/Topology.hpp b/node/Topology.hpp
index 4870ab5e..d29c424e 100644
--- a/node/Topology.hpp
+++ b/node/Topology.hpp
@@ -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;
}