mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Bug #6003 - Don't free the channel structure until after having sent the manager event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3055,7 +3055,6 @@ int ast_do_masquerade(struct ast_channel *original)
|
|||||||
if (ast_test_flag(clone, AST_FLAG_ZOMBIE)) {
|
if (ast_test_flag(clone, AST_FLAG_ZOMBIE)) {
|
||||||
ast_log(LOG_DEBUG, "Destroying channel clone '%s'\n", clone->name);
|
ast_log(LOG_DEBUG, "Destroying channel clone '%s'\n", clone->name);
|
||||||
ast_mutex_unlock(&clone->lock);
|
ast_mutex_unlock(&clone->lock);
|
||||||
ast_channel_free(clone);
|
|
||||||
manager_event(EVENT_FLAG_CALL, "Hangup",
|
manager_event(EVENT_FLAG_CALL, "Hangup",
|
||||||
"Channel: %s\r\n"
|
"Channel: %s\r\n"
|
||||||
"Uniqueid: %s\r\n"
|
"Uniqueid: %s\r\n"
|
||||||
@@ -3066,6 +3065,7 @@ int ast_do_masquerade(struct ast_channel *original)
|
|||||||
clone->hangupcause,
|
clone->hangupcause,
|
||||||
ast_cause2str(clone->hangupcause)
|
ast_cause2str(clone->hangupcause)
|
||||||
);
|
);
|
||||||
|
ast_channel_free(clone);
|
||||||
} else {
|
} else {
|
||||||
struct ast_frame null_frame = { AST_FRAME_NULL, };
|
struct ast_frame null_frame = { AST_FRAME_NULL, };
|
||||||
ast_log(LOG_DEBUG, "Released clone lock on '%s'\n", clone->name);
|
ast_log(LOG_DEBUG, "Released clone lock on '%s'\n", clone->name);
|
||||||
|
Reference in New Issue
Block a user