fixed session-accept
This commit is contained in:
parent
27649a64aa
commit
c0e4756f12
1 changed files with 5 additions and 7 deletions
|
@ -385,7 +385,7 @@ class JingleSession(object):
|
||||||
|
|
||||||
transport = JingleTransportIBB()
|
transport = JingleTransportIBB()
|
||||||
self.modify_content(creator, name, transport)
|
self.modify_content(creator, name, transport)
|
||||||
#self.state = JingleStates.pending
|
self.state = JingleStates.pending
|
||||||
self.contents[(creator,name)].state = STATE_TRANSPORT_REPLACE
|
self.contents[(creator,name)].state = STATE_TRANSPORT_REPLACE
|
||||||
self.__ack(stanza, jingle, error, action)
|
self.__ack(stanza, jingle, error, action)
|
||||||
self.__session_accept()
|
self.__session_accept()
|
||||||
|
@ -627,14 +627,12 @@ class JingleSession(object):
|
||||||
return (reason, text)
|
return (reason, text)
|
||||||
|
|
||||||
def __make_jingle(self, action, reason=None):
|
def __make_jingle(self, action, reason=None):
|
||||||
stanza = xmpp.Iq(typ='set', to=xmpp.JID(self.peerjid))
|
stanza = xmpp.Iq(typ='set', to=xmpp.JID(self.peerjid),
|
||||||
|
frm=self.responder)
|
||||||
attrs = {'action': action,
|
attrs = {'action': action,
|
||||||
'sid': self.sid}
|
'sid': self.sid}
|
||||||
if action == 'session-initiate':
|
if action == 'session-initiate' or action == 'session-accept' or \
|
||||||
attrs['initiator'] = self.initiator
|
action == 'transport-replace':
|
||||||
elif action == 'session-accept':
|
|
||||||
attrs['responder'] = self.responder
|
|
||||||
elif action == 'transport-replace':
|
|
||||||
attrs['initiator'] = self.initiator
|
attrs['initiator'] = self.initiator
|
||||||
jingle = stanza.addChild('jingle', attrs=attrs, namespace=xmpp.NS_JINGLE)
|
jingle = stanza.addChild('jingle', attrs=attrs, namespace=xmpp.NS_JINGLE)
|
||||||
if reason is not None:
|
if reason is not None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue