[Asterisk-code-review] apps/app dial: Fix crash on non-connect call paths for Priva... (asterisk[14])
Anonymous Coward
asteriskteam at digium.com
Wed Sep 7 16:22:00 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: apps/app_dial: Fix crash on non-connect call paths for Privacy/Screening option
......................................................................
apps/app_dial: Fix crash on non-connect call paths for Privacy/Screening option
In any scenario in which the callee is not connected to the caller, the
current code in app_dial will crash due to raising a Dial End Stasis
Message after the callee channel has been hung up. This patch corrects
the error by simply moving the explicit hangup of the callee (peer)
channel until after the dial end message.
ASTERISK-25691 #close
Change-Id: I816a414014424d0d8c80e2a3cbef13ef8c63798d
---
M apps/app_dial.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
George Joseph: Looks good to me, approved
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 48193b5..8ca69e6 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1946,8 +1946,6 @@
}
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;
}
}
@@ -2804,6 +2802,8 @@
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;
}
--
To view, visit https://gerrit.asterisk.org/3825
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I816a414014424d0d8c80e2a3cbef13ef8c63798d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list