From b87802867163d677b7c43fba502ad8a985590fde Mon Sep 17 00:00:00 2001 From: Daniel Ehlers Date: Mon, 18 Nov 2013 22:39:44 +0100 Subject: [PATCH] Fix link handling. Accidental the LinkConnector object was used for checking the nodes, this patch fixes this behaviour. --- rrd.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rrd.py b/rrd.py index dd4d7f3..ac3c4e7 100755 --- a/rrd.py +++ b/rrd.py @@ -110,10 +110,12 @@ class rrd: else: clientCount += 1 for link in db.get_links(): - if link.source in nodes and not link.target in nodes: - nodes[link.source].clients += 1 - elif link.target in nodes and not link.source in nodes: - nodes[link.source].clients += 1 + source = link.source.interface + target = link.target.interface + if source in nodes and not target in nodes: + nodes[source].clients += 1 + elif target in nodes and not source in nodes: + nodes[target].clients += 1 self.checkAndCreateIfNeededGlobalDatabase() self.updateGlobalDatabase(len(nodes),clientCount)