diff --git a/src/common/jingle.py b/src/common/jingle.py index 0aa23be21..2bb674a46 100644 --- a/src/common/jingle.py +++ b/src/common/jingle.py @@ -145,10 +145,7 @@ class ConnectionJingle(object): gajim.get_jid_without_resource(jid)) if contact is None: return - if contact.supports(xmpp.NS_JINGLE_XTLS): - use_security = True - else: - use_security = False + use_security = contact.supports(xmpp.NS_JINGLE_XTLS) if jingle: file_props['sid'] = jingle.sid jingle.add_content('file', diff --git a/src/common/jingle_ft.py b/src/common/jingle_ft.py index eec4aa79a..4bf8e6c05 100644 --- a/src/common/jingle_ft.py +++ b/src/common/jingle_ft.py @@ -92,11 +92,7 @@ class JingleFileTransfer(JingleContent): file_props['session-type'] = 'jingle' - security = content.getTag('security') - if not security: - self.use_security = False - else: - self.use_security = True + self.use_security = bool(content.getTag('security')) file_tag = content.getTag('description').getTag('offer').getTag('file') for attribute in file_tag.getAttrs(): @@ -132,8 +128,6 @@ class JingleFileTransfer(JingleContent): self.session.connection.dispatch('FILE_REQUEST', (jid, file_props)) - - def __on_session_accept(self, stanza, content, error, action): log.info("__on_session_accept")