Renegotiate if the remote end got disconnected and now got back online.
This commit is contained in:
parent
87d5904384
commit
83a317c042
|
@ -2262,12 +2262,11 @@ class ChatControl(ChatControlBase):
|
||||||
# notexistant check
|
# notexistant check
|
||||||
if not e2e_is_active and e2e_pref and \
|
if not e2e_is_active and e2e_pref and \
|
||||||
not self.no_autonegotiation and gajim.HAVE_PYCRYPTO \
|
not self.no_autonegotiation and gajim.HAVE_PYCRYPTO \
|
||||||
and e2e_pref and gajim.capscache.is_supported(
|
and gajim.capscache.is_supported(self.contact,
|
||||||
self.contact, NS_ESESSION) and not \
|
NS_ESESSION) and not gajim.capscache.is_supported(
|
||||||
gajim.capscache.is_supported(self.contact,
|
self.contact, 'notexistant'):
|
||||||
'notexistant'):
|
|
||||||
self.no_autonegotiation = True
|
|
||||||
self.begin_e2e_negotiation()
|
self.begin_e2e_negotiation()
|
||||||
|
self.no_autonegotiation = True
|
||||||
else:
|
else:
|
||||||
self.send_chatstate('active', self.contact)
|
self.send_chatstate('active', self.contact)
|
||||||
|
|
||||||
|
|
10
src/gajim.py
10
src/gajim.py
|
@ -776,12 +776,20 @@ class Interface:
|
||||||
|
|
||||||
# disable encryption, since if any messages are
|
# disable encryption, since if any messages are
|
||||||
# lost they'll be not decryptable (note that
|
# lost they'll be not decryptable (note that
|
||||||
# this contradicts XEP-0201 - trying to get the
|
# this contradicts XEP-0201 - trying to get that
|
||||||
# in the XEP, though)
|
# in the XEP, though)
|
||||||
|
#
|
||||||
|
# FIXME: This *REALLY* are TOO many leves of
|
||||||
|
# indentation! We even need to introduce
|
||||||
|
# a temp var here to make it somehow fit!
|
||||||
if gajim.connections[account].sessions. \
|
if gajim.connections[account].sessions. \
|
||||||
has_key(ji):
|
has_key(ji):
|
||||||
for sess in gajim.connections \
|
for sess in gajim.connections \
|
||||||
[account]. sessions[ji].values():
|
[account]. sessions[ji].values():
|
||||||
|
ctrl = sess.control
|
||||||
|
if ctrl:
|
||||||
|
ctrl.no_autonegotiation\
|
||||||
|
= False
|
||||||
if sess.enable_encryption:
|
if sess.enable_encryption:
|
||||||
sess.terminate_e2e()
|
sess.terminate_e2e()
|
||||||
gajim.connections \
|
gajim.connections \
|
||||||
|
|
Loading…
Reference in New Issue