From b6b44cb32853bd3bea6cc07fa59aebf03475a866 Mon Sep 17 00:00:00 2001 From: Jefry Lagrange Date: Sun, 10 Jun 2012 17:08:54 -0400 Subject: [PATCH] make werequest an optional argument in JingleSession --- src/common/jingle.py | 4 ++-- src/common/jingle_session.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/jingle.py b/src/common/jingle.py index 60a1bcd17..c3bfc494f 100644 --- a/src/common/jingle.py +++ b/src/common/jingle.py @@ -101,7 +101,7 @@ class ConnectionJingle(object): # do we need to create a new jingle object if sid not in self._sessions: #TODO: tie-breaking and other things... - newjingle = JingleSession(con=self, werequest=False, weinitiate=False, jid=jid, + newjingle = JingleSession(con=self, weinitiate=False, jid=jid, iq_id=id_, sid=sid) self._sessions[sid] = newjingle @@ -148,7 +148,7 @@ class ConnectionJingle(object): if contact is None: return use_security = contact.supports(xmpp.NS_JINGLE_XTLS) - jingle = JingleSession(self, request, weinitiate=True, jid=jid) + jingle = JingleSession(self, weinitiate=True, jid=jid, werequest=request) # this is a file transfer jingle.session_type_FT = True self._sessions[jingle.sid] = jingle diff --git a/src/common/jingle_session.py b/src/common/jingle_session.py index 5b671ae51..60061bd81 100644 --- a/src/common/jingle_session.py +++ b/src/common/jingle_session.py @@ -63,7 +63,8 @@ class JingleSession(object): negotiated between an initiator and a responder. """ - def __init__(self, con, werequest, weinitiate, jid, iq_id=None, sid=None): + def __init__(self, con, weinitiate, jid, iq_id=None, sid=None, + werequest=False): """ con -- connection object, weinitiate -- boolean, are we the initiator?