jingle XEP-0166: fixed session creation on non session-initiate actions

This commit is contained in:
Goffi 2015-11-17 19:39:08 +01:00
commit ee65aa7f3c

View file

@ -411,6 +411,11 @@ class XEP_0166(object):
try:
session = client.jingle_sessions[sid]
except KeyError:
if action != XEP_0166.A_SESSION_INITIATE:
log.warning(u"Received request for an unknown session id: {}".format(sid))
self.sendError('not-acceptable', None, request, profile=profile)
return
session = client.jingle_sessions[sid] = {'id': sid,
'state': STATE_PENDING,
'initiator': peer_jid,