Skip to content
Snippets Groups Projects
Commit f3996ba0 authored by jkerdreu's avatar jkerdreu
Browse files

Fix a stupid bug that cause unexpected answer


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/fork@1505 b32b6428-25c9-4566-ad07-03861ab6144f
parent 19ecfb57
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,17 @@ class Scanner:
def parse_answer(self,msg):
if (msg.msgtype == 'notify'):
if msg.action == 'alive':
if msg.source == self.addr:return #hidding myself
if msg.source not in self.seen:
# hidding myself
if msg.source == self.addr:
return
#it is really for us ?
if self.devtype != 'any.any':
if msg.devtype != self.devtype:
return
# already seen this
if msg.source in self.seen:
return
# everything is Ok :)
print("%s : %s" % (msg.source,msg.devtype))
self.seen.append(msg.source)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment