diff options
author | Steve Murphy <murf@digium.com> | 2007-07-27 15:46:20 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2007-07-27 15:46:20 +0000 |
commit | ceca4d97e1fef12b63e885f118c97d439db773a9 (patch) | |
tree | 3e9813b6415afeb3ce63b914c279125d3a9b0275 /apps | |
parent | d17d9c542b8ed74d7deff1ecdafd2a3c34fa1ad5 (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: https://origsvn.digium.com/svn/asterisk/trunk@77520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_dial.c | 5 |
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) |