aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_while.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-14 00:41:37 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-14 00:41:37 +0000
commitbfa05db5fac6413d46d5d643c8aa561d3b0dd994 (patch)
tree6f1920fcbc602483365dd4e430b950439881bdf6 /apps/app_while.c
parent02733a7efd6a77e058f768e43e8a6a2963b99cf4 (diff)
ast_waitfordigit() requires that the channel be up, for no good logical
reason. This prevents While/EndWhile from working within the "h" extension. Reported by: jgalarneau (for ABE C.2) Fixed by: me git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@156755 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_while.c')
-rw-r--r--apps/app_while.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_while.c b/apps/app_while.c
index 8595916f3..8e8fabd5b 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -181,12 +181,16 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
u = ast_module_user_add(chan);
+#if 0
/* dont want run away loops if the chan isn't even up
this is up for debate since it slows things down a tad ......
+
+ Debate is over... this prevents While/EndWhile from working
+ within the "h" extension. Not good.
*/
if (ast_waitfordigit(chan,1) < 0)
ALL_DONE(u,-1);
-
+#endif
for (x=0;;x++) {
if (get_index(chan, prefix, x)) {