From: Russell Bryant Date: Fri, 5 May 2006 14:44:50 +0000 (+0000) Subject: use pbx_checkcondition() instead of ast_true() to evaluate the condition X-Git-Tag: 1.2.8~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d0eead21848d3225d8f531eb46ec93e8a698f51;p=thirdparty%2Fasterisk.git use pbx_checkcondition() instead of ast_true() to evaluate the condition for MacroIf and WhileIf (issue #7086) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24837 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_macro.c b/apps/app_macro.c index 7e7c9141a1..745bf4e365 100644 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -337,7 +337,7 @@ static int macroif_exec(struct ast_channel *chan, void *data) *label_b = '\0'; label_b++; } - if (ast_true(expr)) + if (pbx_checkcondition(expr)) macro_exec(chan, label_a); else if (label_b) macro_exec(chan, label_b); diff --git a/apps/app_while.c b/apps/app_while.c index 7c98afe807..a0e5ca063e 100644 --- a/apps/app_while.c +++ b/apps/app_while.c @@ -103,7 +103,7 @@ static int execif_exec(struct ast_channel *chan, void *data) { } else mydata = ""; - if (ast_true(expr)) { + if (pbx_checkcondition(expr)) { if ((app = pbx_findapp(myapp))) { res = pbx_exec(chan, app, mydata, 1); } else { @@ -269,7 +269,7 @@ static int _while_exec(struct ast_channel *chan, void *data, int end) } - if (!end && !ast_true(condition)) { + if (!end && !pbx_check_condition(condition)) { /* Condition Met (clean up helper vars) */ pbx_builtin_setvar_helper(chan, varname, NULL); pbx_builtin_setvar_helper(chan, my_name, NULL);