diff options
author | Mark Michelson <mmichelson@digium.com> | 2016-01-13 15:10:42 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-01-13 15:10:42 -0600 |
commit | caba57631d87935d984a211df8ef14ecb5e04722 (patch) | |
tree | ca109de997ac3803bc34c532ba59234658a9ee39 | |
parent | f18ad96b77d2f6fd2434b52eb62e5f3b1e079512 (diff) | |
parent | 32b29d7b027b43f78ffda3b85adb35653d5365b3 (diff) |
Merge "app: Queue hangup if channel is hung up during sub or macro execution." into 13
-rw-r--r-- | main/app.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/main/app.c b/main/app.c index c4143d840..a89e5b06f 100644 --- a/main/app.c +++ b/main/app.c @@ -357,6 +357,11 @@ int ast_app_exec_macro(struct ast_channel *autoservice_chan, struct ast_channel if (autoservice_chan) { ast_autoservice_stop(autoservice_chan); } + + if (ast_check_hangup_locked(macro_chan)) { + ast_queue_hangup(macro_chan); + } + return res; } @@ -433,6 +438,11 @@ int ast_app_exec_sub(struct ast_channel *autoservice_chan, struct ast_channel *s if (autoservice_chan) { ast_autoservice_stop(autoservice_chan); } + + if (!ignore_hangup && ast_check_hangup_locked(sub_chan)) { + ast_queue_hangup(sub_chan); + } + return res; } |