[asterisk-commits] branch 1.2 - r7482 /branches/1.2/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Dec 14 20:51:56 CST 2005


Author: bweschke
Date: Wed Dec 14 20:51:54 2005
New Revision: 7482

URL: http://svn.digium.com/view/asterisk?rev=7482&view=rev
Log:
Bug #6003 - Don't free the channel structure until after having sent the manager event.


Modified:
    branches/1.2/channel.c

Modified: branches/1.2/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channel.c?rev=7482&r1=7481&r2=7482&view=diff
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Wed Dec 14 20:51:54 2005
@@ -3055,7 +3055,6 @@
 	if (ast_test_flag(clone, AST_FLAG_ZOMBIE)) {
 		ast_log(LOG_DEBUG, "Destroying channel clone '%s'\n", clone->name);
 		ast_mutex_unlock(&clone->lock);
-		ast_channel_free(clone);
 		manager_event(EVENT_FLAG_CALL, "Hangup", 
 			"Channel: %s\r\n"
 			"Uniqueid: %s\r\n"
@@ -3066,6 +3065,7 @@
 			clone->hangupcause,
 			ast_cause2str(clone->hangupcause)
 			);
+		ast_channel_free(clone);
 	} else {
 		struct ast_frame null_frame = { AST_FRAME_NULL, };
 		ast_log(LOG_DEBUG, "Released clone lock on '%s'\n", clone->name);



More information about the asterisk-commits mailing list