summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-12 12:54:14 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-12 12:54:14 -0700
commit8a9762331f67f517d57b39ad3bbf9761960bb047 (patch)
treeebf46ba567aee08079f10e2e162ff3392c69c618
parent31db6f8f3687da87391c04cc0c0cd77c6ad888de (diff)
downloadinfinitytier-8a9762331f67f517d57b39ad3bbf9761960bb047.tar.gz
infinitytier-8a9762331f67f517d57b39ad3bbf9761960bb047.zip
Fix one more old NetworkConfig bit of code.
-rw-r--r--node/Topology.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp
index 7197dd9b..21ed78a7 100644
--- a/node/Topology.cpp
+++ b/node/Topology.cpp
@@ -284,10 +284,9 @@ bool Topology::isUpstream(const Identity &id) const
return true;
std::vector< SharedPtr<Network> > nws(RR->node->allNetworks());
for(std::vector< SharedPtr<Network> >::const_iterator nw(nws.begin());nw!=nws.end();++nw) {
- SharedPtr<NetworkConfig> nc((*nw)->config2());
- if (nc) {
- for(std::vector< std::pair<Address,InetAddress> >::const_iterator r(nc->relays().begin());r!=nc->relays().end();++r) {
- if (r->first == id.address())
+ if ((*nw)->hasConfig()) {
+ for(unsigned int r=0;r<(*nw)->config().staticDeviceCount();++r) {
+ if ((((*nw)->config().staticDevice(r).flags & ZT_NETWORK_STATIC_DEVICE_IS_RELAY) != 0)&&((*nw)->config().staticDevice(r).address == id.address().toInt()))
return true;
}
}