gajim: link-local: adjust Windows/Bonjour support to new data fo...
changeset db3fc384697e in /home/hg/repos/gajim author: Fabian Pietsch branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=db3fc384697e description: link-local: adjust Windows/Bonjour support to new data format. Fixes #8025 diffstat: src/common/zeroconf/zeroconf_bonjour.py | 9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diffs (33 lines): diff -r 9e4291659c93 -r db3fc384697e src/common/zeroconf/zeroconf_bonjour.py --- a/src/common/zeroconf/zeroconf_bonjour.py Mon Apr 06 18:55:23 2015 +0200 +++ b/src/common/zeroconf/zeroconf_bonjour.py Mon Apr 06 19:14:33 2015 +0200 @@ -133,7 +133,8 @@ # we don't want to see ourselves in the list if name != self.name: -self.contacts[name] = (name, domain, interfaceIndex, protocol, hosttarget, hosttarget, port, bare_name, txtRecord) +resolved_info = [(interfaceIndex, protocol, hosttarget, -1, port)] +self.contacts[name] = (name, domain, resolved_info, bare_name, txtRecord) self.new_serviceCB(name) else: @@ -141,7 +142,7 @@ # In case this is not our own record but of another # gajim instance on the same machine, # it will be used when we get a new name. -self.invalid_self_contact[name] = (name, domain, interfaceIndex, protocol, hosttarget, hosttarget, port, bare_name, txtRecord) +self.invalid_self_contact[name] = (name, domain, (interfaceIndex, protocol, hosttarget, -1, port), bare_name, txtRecord) # count services self.resolved.append(True) @@ -168,7 +169,9 @@ # we don't want to see ourselves in the list if name != self.name: -self.contacts[name] = (name, domain, interfaceIndex, protocol, hosttarget, hosttarget, port, bare_name, txtRecord) +# 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:] def service_added_callback(self, sdRef, flags, errorCode, name, regtype, domain): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits
gajim: link-local: adjust Windows/Bonjour support to new data fo...
changeset 4916254b34b7 in /home/hg/repos/gajim author: Fabian Pietsch branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=4916254b34b7 description: link-local: adjust Windows/Bonjour support to new data format. Fixes #8025 diffstat: src/common/zeroconf/zeroconf_bonjour.py | 9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diffs (33 lines): diff -r ee4655523955 -r 4916254b34b7 src/common/zeroconf/zeroconf_bonjour.py --- a/src/common/zeroconf/zeroconf_bonjour.py Mon Apr 06 18:55:23 2015 +0200 +++ b/src/common/zeroconf/zeroconf_bonjour.py Mon Apr 06 19:14:33 2015 +0200 @@ -133,7 +133,8 @@ # we don't want to see ourselves in the list if name != self.name: -self.contacts[name] = (name, domain, interfaceIndex, protocol, hosttarget, hosttarget, port, bare_name, txtRecord) +resolved_info = [(interfaceIndex, protocol, hosttarget, -1, port)] +self.contacts[name] = (name, domain, resolved_info, bare_name, txtRecord) self.new_serviceCB(name) else: @@ -141,7 +142,7 @@ # In case this is not our own record but of another # gajim instance on the same machine, # it will be used when we get a new name. -self.invalid_self_contact[name] = (name, domain, interfaceIndex, protocol, hosttarget, hosttarget, port, bare_name, txtRecord) +self.invalid_self_contact[name] = (name, domain, (interfaceIndex, protocol, hosttarget, -1, port), bare_name, txtRecord) # count services self.resolved.append(True) @@ -168,7 +169,9 @@ # we don't want to see ourselves in the list if name != self.name: -self.contacts[name] = (name, domain, interfaceIndex, protocol, hosttarget, hosttarget, port, bare_name, txtRecord) +# 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:] def service_added_callback(self, sdRef, flags, errorCode, name, regtype, domain): ___ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits