[asterisk-commits] file: branch 1.4 r50298 - in /branches/1.4: ./
apps/app_dial.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jan 9 21:55:14 MST 2007
Author: file
Date: Tue Jan 9 22:55:13 2007
New Revision: 50298
URL: http://svn.digium.com/view/asterisk?view=rev&rev=50298
Log:
Merged revisions 50295 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r50295 | file | 2007-01-09 23:51:06 -0500 (Tue, 09 Jan 2007) | 2 lines
Add another return value to dial_exec_full that indicates execution is going to continuing at a new extension/context/priority and to just let it slide. (issue #8598 reported by jon)
........
Modified:
branches/1.4/ (props changed)
branches/1.4/apps/app_dial.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=50298&r1=50297&r2=50298
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Tue Jan 9 22:55:13 2007
@@ -1460,7 +1460,7 @@
peer->priority++;
ast_pbx_start(peer);
hanguptree(outgoing, NULL);
- res = 0;
+ res = 1;
goto done;
}
@@ -1653,8 +1653,12 @@
static int dial_exec(struct ast_channel *chan, void *data)
{
struct ast_flags peerflags;
+ int res = 0;
+
memset(&peerflags, 0, sizeof(peerflags));
- return dial_exec_full(chan, data, &peerflags);
+ res = dial_exec_full(chan, data, &peerflags);
+
+ return (res >= 0 ? 0 : -1);
}
static int retrydial_exec(struct ast_channel *chan, void *data)
@@ -1714,7 +1718,10 @@
if (ast_test_flag(chan, AST_FLAG_MOH))
ast_moh_stop(chan);
- if ((res = dial_exec_full(chan, dialdata, &peerflags)) == 0) {
+ res = dial_exec_full(chan, dialdata, &peerflags);
+ if (res == 1) {
+ break;
+ } else if (res == 0) {
if (ast_test_flag(&peerflags, OPT_DTMF_EXIT)) {
if (!(res = ast_streamfile(chan, announce, chan->language)))
res = ast_waitstream(chan, AST_DIGIT_ANY);
@@ -1747,10 +1754,13 @@
}
if (loops == 0)
res = 0;
-
+ else if (res == 1)
+ res = 0;
+
if (ast_test_flag(chan, AST_FLAG_MOH))
ast_moh_stop(chan);
-done:
+
+ done:
ast_module_user_remove(u);
return res;
}
More information about the asterisk-commits
mailing list