comparison src/plugins/plugin_xep_0260.py @ 1755:d2e023da2983

plugin XEP-0260: kill s5b session if session is declined
author Goffi <goffi@goffi.org>
date Thu, 17 Dec 2015 22:10:53 +0100
parents 25906c0dbc63
children 061011fad5b1
comparison
equal deleted inserted replaced
1754:f4e9f2f7fe0f 1755:d2e023da2983
390 else: 390 else:
391 log.warning(u"FIXME: unmanaged action {}".format(action)) 391 log.warning(u"FIXME: unmanaged action {}".format(action))
392 392
393 defer.returnValue(transport_elt) 393 defer.returnValue(transport_elt)
394 394
395 def jingleTerminate(self, action, session, content_name, reason_elt, profile):
396 if reason_elt.decline:
397 log.debug(u"Session declined, deleting S5B session")
398 # we just need to clean the S5B session if it is declined
399 client = self.host.getClient(profile)
400 content_data = session['contents'][content_name]
401 transport_data = content_data['transport_data']
402 self._s5b.killSession(None, transport_data['session_hash'], None, client)
403
395 def _doFallback(self, feature_checked, session, content_name, client): 404 def _doFallback(self, feature_checked, session, content_name, client):
396 """Do the fallback, method called once feature is checked 405 """Do the fallback, method called once feature is checked
397 406
398 @param feature_checked(bool): True if other peer can do IBB 407 @param feature_checked(bool): True if other peer can do IBB
399 """ 408 """