From 20637b2ef1527461d8ae2728de9897e2c85886be Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 5 Nov 2016 15:16:20 +0000 Subject: [PATCH] Fix Bonjour code to not rely on undeclared variables. --- src/common/zeroconf/zeroconf_bonjour.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/zeroconf/zeroconf_bonjour.py b/src/common/zeroconf/zeroconf_bonjour.py index 56751e419..0016429d9 100644 --- a/src/common/zeroconf/zeroconf_bonjour.py +++ b/src/common/zeroconf/zeroconf_bonjour.py @@ -20,7 +20,7 @@ from common import gajim import select import re -from common.zeroconf.zeroconf import C_BARE_NAME, C_DOMAIN +from common.zeroconf.zeroconf import C_BARE_NAME, C_DOMAIN, C_TXT try: import pybonjour @@ -171,7 +171,7 @@ class Zeroconf: if name != self.name: # update TXT data only, as intended according to resolve_all comment old_contact = self.contacts[name] - self.contacts[name] = old_contact[0:C_TXT] + (txt,) + old_contact[C_TXT+1:] + self.contacts[name] = old_contact[0:C_TXT] + (self.txt,) + old_contact[C_TXT+1:] def service_added_callback(self, sdRef, flags, errorCode, name, regtype, domain):