]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Hangup affected channel in error paths of bridge_call_thread().
authorRichard Mudgett <rmudgett@digium.com>
Tue, 24 Apr 2012 23:58:55 +0000 (23:58 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 24 Apr 2012 23:58:55 +0000 (23:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@363375 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/features.c

index c179b3793883c7f321d8ccbcbb89359de404856b..e384a1562103fabb4e1f4dcb073db95bba5f7a94 100644 (file)
@@ -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);