From 937e690d0d8e354276e458b0acaf1ac1224fe09c Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Wed, 25 Apr 2012 00:01:21 +0000 Subject: [PATCH] Hangup affected channel in error paths of bridge_call_thread(). ........ Merged revisions 363375 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@363376 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/main/features.c b/main/features.c index a774870c99..4b2295dd9f 100644 --- a/main/features.c +++ b/main/features.c @@ -922,17 +922,23 @@ static void *bridge_call_thread(void *data) if (!ast_check_hangup(tobj->peer)) { ast_log(LOG_VERBOSE, "putting peer %s into PBX again\n", tobj->peer->name); res = ast_pbx_start(tobj->peer); - if (res != AST_PBX_SUCCESS) + if (res != AST_PBX_SUCCESS) { ast_log(LOG_WARNING, "FAILED continuing PBX on peer %s\n", tobj->peer->name); - } else + ast_hangup(tobj->peer); + } + } else { ast_hangup(tobj->peer); + } if (!ast_check_hangup(tobj->chan)) { ast_log(LOG_VERBOSE, "putting chan %s into PBX again\n", tobj->chan->name); res = ast_pbx_start(tobj->chan); - if (res != AST_PBX_SUCCESS) + if (res != AST_PBX_SUCCESS) { ast_log(LOG_WARNING, "FAILED continuing PBX on chan %s\n", tobj->chan->name); - } else + ast_hangup(tobj->chan); + } + } else { ast_hangup(tobj->chan); + } } else { ast_hangup(tobj->chan); ast_hangup(tobj->peer); -- 2.47.2