aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-27 15:46:20 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-27 15:46:20 +0000
commitbd5486e7f88558146962fe1d212b1702404acd97 (patch)
tree3e9813b6415afeb3ce63b914c279125d3a9b0275 /apps
parent04a8d2dc0849df11d393818248464294db1f0fcb (diff)
These fixes take care of two problems: a complaint in asterisk-dev that goto's aren't working in trunk, a side effect of the move to commas as arg seps in apps and funcs; and a problem I spotted myself with dial's 'e' option, where gotos were off by one, because I forgot to set the AUTOLOOP flag in the peer channel.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77520 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index a302aa00a..8fd479f22 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1771,8 +1771,12 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
strcpy(peer->context, chan->context);
if (ast_test_flag64(&opts, OPT_PEER_H) && ast_exists_extension(peer, peer->context, "h", 1, peer->cid.cid_num)) {
+ int autoloopflag;
strcpy(peer->exten, "h");
peer->priority = 1;
+ autoloopflag = ast_test_flag(peer, AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */
+ ast_set_flag(peer, AST_FLAG_IN_AUTOLOOP);
+
while (ast_exists_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num)) {
if ((res = ast_spawn_extension(peer, peer->context, peer->exten, peer->priority, peer->cid.cid_num))) {
/* Something bad happened, or a hangup has been requested. */
@@ -1782,6 +1786,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
peer->priority++;
}
+ ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP); /* set it back the way it was */
}
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)