summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2013-01-11 23:05:38 +0000
committerJoshua Colp <jcolp@digium.com>2013-01-11 23:05:38 +0000
commitc5ec471766200966b567d9cc4709d03b9551361c (patch)
tree2e840cc16322230ccd2a5cb87be2a257f353628f /res
parent7695ea2643456ab0c837f958cc484d26529e1098 (diff)
Retain XMPP filters across reconnections so external modules continue to function as expected.
Previously if an XMPP client reconnected any filters added by an external module were lost. This issue exhibited itself with chan_motif not receiving and reacting to Jingle signaling. (closes issue ASTERISK-20916) Reported by: kuj ........ Merged revisions 378917 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_xmpp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/res/res_xmpp.c b/res/res_xmpp.c
index 1e130e771..04db2dda9 100644
--- a/res/res_xmpp.c
+++ b/res/res_xmpp.c
@@ -440,6 +440,10 @@ static void xmpp_client_destructor(void *obj)
ast_xmpp_client_disconnect(client);
+ if (client->filter) {
+ iks_filter_delete(client->filter);
+ }
+
if (client->stack) {
iks_stack_delete(client->stack);
}
@@ -3408,12 +3412,6 @@ int ast_xmpp_client_disconnect(struct ast_xmpp_client *client)
iks_disconnect(client->parser);
}
- /* Disconnecting the parser and going back to a disconnected state means any hooks should no longer be present */
- if (client->filter) {
- iks_filter_delete(client->filter);
- client->filter = NULL;
- }
-
client->state = XMPP_STATE_DISCONNECTED;
return 0;