Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0166.py @ 1615:a1e5bcd9a6eb
jingle XEP-0166: fixed session creation on non session-initiate actions
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 17 Nov 2015 19:39:08 +0100 |
parents | 1ced93821c35 |
children | 1e05b776a55b |
comparison
equal
deleted
inserted
replaced
1614:1ced93821c35 | 1615:a1e5bcd9a6eb |
---|---|
409 | 409 |
410 # we get or create the session | 410 # we get or create the session |
411 try: | 411 try: |
412 session = client.jingle_sessions[sid] | 412 session = client.jingle_sessions[sid] |
413 except KeyError: | 413 except KeyError: |
414 if action != XEP_0166.A_SESSION_INITIATE: | |
415 log.warning(u"Received request for an unknown session id: {}".format(sid)) | |
416 self.sendError('not-acceptable', None, request, profile=profile) | |
417 return | |
418 | |
414 session = client.jingle_sessions[sid] = {'id': sid, | 419 session = client.jingle_sessions[sid] = {'id': sid, |
415 'state': STATE_PENDING, | 420 'state': STATE_PENDING, |
416 'initiator': peer_jid, | 421 'initiator': peer_jid, |
417 'role': XEP_0166.ROLE_RESPONDER, | 422 'role': XEP_0166.ROLE_RESPONDER, |
418 'peer_jid': peer_jid, | 423 'peer_jid': peer_jid, |