]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Reset hangup flags on channels created through messages and cleanup globals
authorBrent Eagles <beagles@digium.com>
Fri, 28 Sep 2012 13:04:11 +0000 (13:04 +0000)
committerBrent Eagles <beagles@digium.com>
Fri, 28 Sep 2012 13:04:11 +0000 (13:04 +0000)
in res_xmpp on unload.

This patch fixes an issue where hangup flags were not being reset on a
channel, affecting subsequent use of that channel. The patch also adds some
additional cleanup to res_xmpp to fix an issue with reloading the module.

(closes ASTERISK-20360)
Reported by: Noah Engelberth
Tested by: beagles
Review: https://reviewboard.asterisk.org/r/2134/
........

Merged revisions 374019 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374020 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/message.c
res/res_xmpp.c

index 26fea1aca9273af691fc4c8548d009559e3b0ba3..c04413dc8fd47ef9c4dde056c7ef510e5329ef92 100644 (file)
@@ -752,6 +752,10 @@ static void chan_cleanup(struct ast_channel *chan)
        if (msg_ds) {
                ast_channel_datastore_add(chan, msg_ds);
        }
+       /*
+        * Clear softhangup flags.
+        */
+       ast_channel_clear_softhangup(chan, AST_SOFTHANGUP_ALL);
 
        ast_channel_unlock(chan);
 }
index ed4c95618fcd8a6bd8611965973b75dbe6ed2ac8..9e9d47c168171d59e0c3c0b86de7a5009b390437 100644 (file)
@@ -4204,6 +4204,8 @@ static int unload_module(void)
        ast_manager_unregister("JabberSend");
        ast_custom_function_unregister(&jabberstatus_function);
        ast_custom_function_unregister(&jabberreceive_function);
+       aco_info_destroy(&cfg_info);
+       ao2_global_obj_release(globals);
 
        ast_cond_destroy(&message_received_condition);
        ast_mutex_destroy(&messagelock);