fkie_master_discovery: fixed usage of sync_nodes and sync_topics together
@@ -1154,17 +1154,11 @@ class MasterInfo(object):
serviceProvider = []
added_nodes = []
nodes_last_check = set()
- # process the node filtering first, but the nodelist to send will be created later
- for name, node in self.nodes.items():
- if not iffilter.is_ignored_node(name):
- if filter_interface is None or node.isLocal or (iffilter.sync_remote_nodes() and self.masteruri == str(node.masteruri)):
- added_nodes.append(name)
# filter the topics
for name, topic in self.topics.items():
pn = []
for n in topic.publisherNodes:
- if n in added_nodes:
if not iffilter.is_ignored_publisher(n, name, topic.type):
pn.append(n)
nodes_last_check.add(n)
@@ -1172,7 +1166,6 @@ class MasterInfo(object):
publishers.append((name, pn))
sn = []
for n in topic.subscriberNodes:
- if n in added_nodes:
if not iffilter.is_ignored_subscriber(n, name, topic.type):
sn.append(n)
nodes_last_check.add(n)
@@ -1185,7 +1178,6 @@ class MasterInfo(object):
for name, service in self.services.items():
srv_prov = []
for sp in service.serviceProvider:
- if sp in added_nodes:
if not iffilter.is_ignored_service(sp, name):
srv_prov.append(sp)
nodes_last_check.add(sp)
