Changeset 9625 for trunk/src/common/stanza_session.py
- Timestamp:
- 05/13/08 03:59:10 (6 months ago)
- Files:
-
- 1 modified
-
trunk/src/common/stanza_session.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/stanza_session.py
r9616 r9625 33 33 self.thread_id = self.generate_thread_id() 34 34 35 self.loggable = True 36 35 37 self.last_send = 0 36 38 self.status = None 37 39 self.negotiated = {} 40 41 def is_loggable(self): 42 account = self.conn.name 43 no_log_for = gajim.config.get_per('accounts', account, 'no_log_for') 44 45 if not no_log_for: 46 no_log_for = '' 47 48 no_log_for = no_log_for.split() 49 50 return self.loggable and account not in no_log_for and self.jid not in no_log_for 38 51 39 52 def generate_thread_id(self): … … 71 84 '''A negotiation has been cancelled, so reset this session to its default state.''' 72 85 73 if hasattr(self, 'control'):86 if self.control: 74 87 self.control.on_cancel_session_negotiation() 75 88 … … 132 145 def __init__(self, conn, jid, thread_id, type = 'chat'): 133 146 StanzaSession.__init__(self, conn, jid, thread_id, type = 'chat') 134 135 self.loggable = True136 147 137 148 self.xes = {} … … 768 779 self.enable_encryption = True 769 780 770 if hasattr(self, 'control'):781 if self.control: 771 782 self.control.print_esession_details() 772 783 … … 788 799 self.do_retained_secret(k, srs) 789 800 790 # don't need to calculate ks_s here 791 801 # ks_s doesn't need to be calculated here 792 802 self.kc_s, self.km_s, self.ks_s = self.generate_initiator_keys(k) 793 803 self.kc_o, self.km_o, self.ks_o = self.generate_responder_keys(k) … … 796 806 797 807 self.verify_identity(form, self.d, False, 'b') 798 # Note: If Alice discovers an error then she SHOULD ignore any encrypted content she received in the stanza.808 # Note: If Alice discovers an error then she SHOULD ignore any encrypted content she received in the stanza. 799 809 800 810 if self.negotiated['logging'] == 'mustnot': … … 804 814 self.enable_encryption = True 805 815 806 if hasattr(self, 'control'):816 if self.control: 807 817 self.control.print_esession_details() 808 818 … … 892 902 self.km_o = '' 893 903 894 def is_loggable(self):895 account = self.conn.name896 no_log_for = gajim.config.get_per('accounts', account, 'no_log_for')897 898 if not no_log_for:899 no_log_for = ''900 901 no_log_for = no_log_for.split()902 903 return self.loggable and account not in no_log_for and self.jid not in no_log_for904 905 904 def cancelled_negotiation(self): 906 905 StanzaSession.cancelled_negotiation(self)
