mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 16:50:14 +00:00
Merge "app: Queue hangup if channel is hung up during sub or macro execution." into 13
This commit is contained in:
10
main/app.c
10
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user