From: Joshua Colp Date: Fri, 11 Jan 2013 23:04:53 +0000 (+0000) Subject: Retain XMPP filters across reconnections so external modules continue to function... X-Git-Tag: 11.3.0-rc1~3^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cef6475eb081c4f7b1fcb3cab398c46007231292;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@378917 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_xmpp.c b/res/res_xmpp.c index 1a73ca9e8a..6db6890305 100644 --- a/res/res_xmpp.c +++ b/res/res_xmpp.c @@ -431,6 +431,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); } @@ -3394,12 +3398,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;