Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim

Commits:
beaa82cf by Philipp Hörist at 2017-04-10T23:32:07+02:00
Correctly publish zeroconf txt data

Fixes #8532

- - - - -


1 changed file:

- src/common/zeroconf/zeroconf_bonjour.py


Changes:

=====================================
src/common/zeroconf/zeroconf_bonjour.py
=====================================
--- a/src/common/zeroconf/zeroconf_bonjour.py
+++ b/src/common/zeroconf/zeroconf_bonjour.py
@@ -43,7 +43,7 @@ class Zeroconf:
         self.port = port # listening port that gets announced
         self.username = name
         self.host = host
-        self.txt = pybonjour.TXTRecord()                # service data
+        self.txt = {}  # service data
 
         # XXX these CBs should be set to None when we destroy the object
         # (go offline), because they create a circular reference
@@ -245,7 +245,7 @@ class Zeroconf:
         txt = {}
 
         #remove empty keys
-        for key, val in self.txt:
+        for key, val in self.txt.iteritems():
             if val:
                 txt[key] = val
 
@@ -259,13 +259,12 @@ class Zeroconf:
         else:
             txt['status'] = 'avail'
 
-        self.txt = pybonjour.TXTRecord(txt, strict=True)
         try:
             self.service_sdRef = pybonjour.DNSServiceRegister(
                 name=self.name,
                 regtype=self.stype,
                 port=self.port,
-                txtRecord=self.txt,
+                txtRecord=pybonjour.TXTRecord(txt),
                 callBack=self.service_added_callback)
 
             log.info('Publishing service %s of type %s' % (self.name, 
self.stype))



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/beaa82cfd6f2b5d317952bba9dcbec3dcb7d7d9f
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to