# HG changeset patch # User Goffi # Date 1450386653 -3600 # Node ID d2e023da2983537ac604cd9db1f0b1f0217220d3 # Parent f4e9f2f7fe0f9b8116808d8cd647620315f11e82 plugin XEP-0260: kill s5b session if session is declined diff -r f4e9f2f7fe0f -r d2e023da2983 src/plugins/plugin_xep_0260.py --- a/src/plugins/plugin_xep_0260.py Thu Dec 17 22:08:11 2015 +0100 +++ b/src/plugins/plugin_xep_0260.py Thu Dec 17 22:10:53 2015 +0100 @@ -392,6 +392,15 @@ defer.returnValue(transport_elt) + def jingleTerminate(self, action, session, content_name, reason_elt, profile): + if reason_elt.decline: + log.debug(u"Session declined, deleting S5B session") + # we just need to clean the S5B session if it is declined + client = self.host.getClient(profile) + content_data = session['contents'][content_name] + transport_data = content_data['transport_data'] + self._s5b.killSession(None, transport_data['session_hash'], None, client) + def _doFallback(self, feature_checked, session, content_name, client): """Do the fallback, method called once feature is checked