Changeset 10021

Show
Ignore:
Timestamp:
07/25/08 00:14:42 (6 weeks ago)
Author:
js
Message:

Renegotiate if the remote end got disconnected and now got back online.

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/chat_control.py

    r10019 r10021  
    22632263                        if not e2e_is_active and e2e_pref and \ 
    22642264                        not self.no_autonegotiation and gajim.HAVE_PYCRYPTO \ 
    2265                         and e2e_pref and gajim.capscache.is_supported( 
    2266                         self.contact, NS_ESESSION) and not \ 
    2267                         gajim.capscache.is_supported(self.contact, 
    2268                         'notexistant'): 
     2265                        and gajim.capscache.is_supported(self.contact, 
     2266                        NS_ESESSION) and not gajim.capscache.is_supported( 
     2267                        self.contact, 'notexistant'): 
     2268                                self.begin_e2e_negotiation() 
    22692269                                self.no_autonegotiation = True 
    2270                                 self.begin_e2e_negotiation() 
    22712270                else: 
    22722271                        self.send_chatstate('active', self.contact) 
  • trunk/src/gajim.py

    r10012 r10021  
    777777                                # disable encryption, since if any messages are 
    778778                                # lost they'll be not decryptable (note that 
    779                                 # this contradicts XEP-0201 - trying to get the 
     779                                # this contradicts XEP-0201 - trying to get that 
    780780                                # in the XEP, though) 
     781                                # 
     782                                # FIXME: This *REALLY* are TOO many leves of 
     783                                #        indentation! We even need to introduce 
     784                                #        a temp var here to make it somehow fit! 
    781785                                if gajim.connections[account].sessions. \ 
    782786                                has_key(ji): 
    783787                                        for sess in gajim.connections \ 
    784788                                        [account]. sessions[ji].values(): 
     789                                                ctrl = sess.control 
     790                                                if ctrl: 
     791                                                        ctrl.no_autonegotiation\ 
     792                                                                = False 
    785793                                                if sess.enable_encryption: 
    786794                                                        sess.terminate_e2e()