Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjs <js-gajim@webkeks.org>2008-07-25 02:14:42 +0400
committerjs <js-gajim@webkeks.org>2008-07-25 02:14:42 +0400
commit83a317c042990566f70248c002910eb8a759de3e (patch)
tree304d93d0987370e29f5d4c51745cd222f4b51c23
parent87d5904384ea085317af4d898ad5da19be5a65e3 (diff)
Renegotiate if the remote end got disconnected and now got back online.
-rw-r--r--src/chat_control.py9
-rwxr-xr-xsrc/gajim.py10
2 files changed, 13 insertions, 6 deletions
diff --git a/src/chat_control.py b/src/chat_control.py
index 58c1af4dd..fb833cc75 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -2262,12 +2262,11 @@ class ChatControl(ChatControlBase):
# notexistant check
if not e2e_is_active and e2e_pref and \
not self.no_autonegotiation and gajim.HAVE_PYCRYPTO \
- and e2e_pref and gajim.capscache.is_supported(
- self.contact, NS_ESESSION) and not \
- gajim.capscache.is_supported(self.contact,
- 'notexistant'):
- self.no_autonegotiation = True
+ and gajim.capscache.is_supported(self.contact,
+ NS_ESESSION) and not gajim.capscache.is_supported(
+ self.contact, 'notexistant'):
self.begin_e2e_negotiation()
+ self.no_autonegotiation = True
else:
self.send_chatstate('active', self.contact)
diff --git a/src/gajim.py b/src/gajim.py
index 5ccc1f0fb..487bd3ddb 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -776,12 +776,20 @@ class Interface:
# disable encryption, since if any messages are
# 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)
+ #
+ # 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. \
has_key(ji):
for sess in gajim.connections \
[account]. sessions[ji].values():
+ ctrl = sess.control
+ if ctrl:
+ ctrl.no_autonegotiation\
+ = False
if sess.enable_encryption:
sess.terminate_e2e()
gajim.connections \