aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-10 04:55:13 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-10 04:55:13 +0000
commit745f27fca3e219a3312e8dd145b72b573f39537a (patch)
treed6fed378e00d2b9f778c55bede16c802a001c014
parent7cb0be5cf960ae967a322a35e1867fc9fa3d22ac (diff)
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) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50298 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_dial.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 0c13db294..fefe4847e 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1460,7 +1460,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
peer->priority++;
ast_pbx_start(peer);
hanguptree(outgoing, NULL);
- res = 0;
+ res = 1;
goto done;
}
@@ -1653,8 +1653,12 @@ done:
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 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
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 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
}
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;
}