fix printing of sent zeroconf messages. fixes #4051
This commit is contained in:
parent
2b896152a2
commit
e22c6e9697
|
@ -698,6 +698,8 @@ class ClientZeroconf:
|
||||||
# look for hashed connections
|
# look for hashed connections
|
||||||
if to in self.recipient_to_hash:
|
if to in self.recipient_to_hash:
|
||||||
conn = self.connections[self.recipient_to_hash[to]]
|
conn = self.connections[self.recipient_to_hash[to]]
|
||||||
|
id = conn.Dispatcher.getAnID()
|
||||||
|
stanza.setID(id)
|
||||||
if conn.add_stanza(stanza, is_message):
|
if conn.add_stanza(stanza, is_message):
|
||||||
if on_ok:
|
if on_ok:
|
||||||
on_ok()
|
on_ok()
|
||||||
|
@ -707,13 +709,18 @@ class ClientZeroconf:
|
||||||
hash = self.ip_to_hash[item['address']]
|
hash = self.ip_to_hash[item['address']]
|
||||||
if self.hash_to_port[hash] == item['port']:
|
if self.hash_to_port[hash] == item['port']:
|
||||||
conn = self.connections[hash]
|
conn = self.connections[hash]
|
||||||
|
id = conn.Dispatcher.getAnID()
|
||||||
|
stanza.setID(id)
|
||||||
if conn.add_stanza(stanza, is_message):
|
if conn.add_stanza(stanza, is_message):
|
||||||
if on_ok:
|
if on_ok:
|
||||||
on_ok()
|
on_ok()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
# otherwise open new connection
|
# otherwise open new connection
|
||||||
|
stanza.setID('zero')
|
||||||
P2PClient(None, item['address'], item['port'], self,
|
P2PClient(None, item['address'], item['port'], self,
|
||||||
[(stanza, is_message)], to, on_ok=on_ok, on_not_ok=on_not_ok)
|
[(stanza, is_message)], to, on_ok=on_ok, on_not_ok=on_not_ok)
|
||||||
|
|
||||||
# vim: se ts=3:
|
return 'zero'
|
||||||
|
|
||||||
|
# vim: se ts=3:
|
||||||
|
|
Loading…
Reference in New Issue