Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
3729db5e by Philipp Hörist at 2017-06-05T23:38:52+02:00
Revert "Correctly publish zeroconf txt data"
This reverts commit beaa82cfd6f2b5d317952bba9dcbec3dcb7d7d9f
- - - - -
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 = {} # service data
+ self.txt = pybonjour.TXTRecord() # 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.iteritems():
+ for key, val in self.txt:
if val:
txt[key] = val
@@ -259,12 +259,13 @@ 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=pybonjour.TXTRecord(txt),
+ txtRecord=self.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/3729db5ed86a4de18be7a962aa235e8f5e…
Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits:
7c09d39e by Philipp Hörist at 2017-06-04T00:39:47+02:00
Dont send smacks delay tag with LMC
Since we save the sent stanzas in the smacks queue for a
potential replay on connection loss, smacks adds a delay tag.
- - - - -
1 changed file:
- src/common/connection.py
Changes:
=====================================
src/common/connection.py
=====================================
--- a/src/common/connection.py
+++ b/src/common/connection.py
@@ -411,6 +411,8 @@ class CommonConnection:
id_ = correction_msg.getID()
if correction_msg.getTag('replace'):
correction_msg.delChild('replace')
+ if correction_msg.getTag('delay'):
+ correction_msg.delChild('delay')
correction_msg.setTag('replace', attrs={'id': id_},
namespace=nbxmpp.NS_CORRECT)
id2 = self.connection.getAnID()
@@ -2737,6 +2739,8 @@ class Connection(CommonConnection, ConnectionHandlers):
id_ = obj.correction_msg.getID()
if obj.correction_msg.getTag('replace'):
obj.correction_msg.delChild('replace')
+ if obj.correction_msg.getTag('delay'):
+ obj.correction_msg.delChild('delay')
obj.correction_msg.setTag('replace', attrs={'id': id_},
namespace=nbxmpp.NS_CORRECT)
id2 = self.connection.getAnID()
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/7c09d39e37dd88ebb0d6a6a61b7572d333…