[asterisk-commits] branch 1.2 r24837 - in /branches/1.2/apps: app_macro.c app_while.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 8 04:10:46 MST 2006


Author: russell
Date: Fri May  5 09:44:50 2006
New Revision: 24837

URL: http://svn.digium.com/view/asterisk?rev=24837&view=rev
Log:
use pbx_checkcondition() instead of ast_true() to evaluate the condition
for MacroIf and WhileIf (issue #7086)

Modified:
    branches/1.2/apps/app_macro.c
    branches/1.2/apps/app_while.c

Modified: branches/1.2/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_macro.c?rev=24837&r1=24836&r2=24837&view=diff
==============================================================================
--- branches/1.2/apps/app_macro.c (original)
+++ branches/1.2/apps/app_macro.c Fri May  5 09:44:50 2006
@@ -337,7 +337,7 @@
 			*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);

Modified: branches/1.2/apps/app_while.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_while.c?rev=24837&r1=24836&r2=24837&view=diff
==============================================================================
--- branches/1.2/apps/app_while.c (original)
+++ branches/1.2/apps/app_while.c Fri May  5 09:44:50 2006
@@ -103,7 +103,7 @@
 		} 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 @@
 	}
 	
 
-	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);



More information about the asterisk-commits mailing list