summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-09-07 17:23:45 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-09-07 17:23:45 -0500
commitcc7e9781497af53e43e82e924e8f945b966770eb (patch)
treeabca73236be9a8f35a2d5f21a673f7bd8ecb3511 /apps/app_dial.c
parent004d3c32ba5e15d06ae709a420c6d9177c91b134 (diff)
parent730cb3b0b741d294e7aecd22e64bb87094480063 (diff)
Merge "apps/app_dial: Fix crash on non-connect call paths for Privacy/Screening option"
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index c427faf6e..316d38da1 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1947,8 +1947,6 @@ static int do_privacy(struct ast_channel *chan, struct ast_channel *peer,
}
return 0; /* the good exit path */
} else {
- /* hang up on the callee -- he didn't want to talk anyway! */
- ast_autoservice_chan_hangup_peer(chan, peer);
return -1;
}
}
@@ -2805,6 +2803,8 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
if ( (ast_test_flag64(&opts, OPT_PRIVACY) || ast_test_flag64(&opts, OPT_SCREENING)) && pa.privdb_val == AST_PRIVACY_UNKNOWN) {
if (do_privacy(chan, peer, &opts, opt_args, &pa)) {
ast_channel_publish_dial(chan, peer, NULL, pa.status);
+ /* hang up on the callee -- he didn't want to talk anyway! */
+ ast_autoservice_chan_hangup_peer(chan, peer);
res = 0;
goto out;
}