[asterisk-commits] trunk r24838 - in /trunk: ./ apps/app_macro.c apps/app_while.c

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


Author: russell
Date: Fri May  5 09:47:22 2006
New Revision: 24838

URL: http://svn.digium.com/view/asterisk?rev=24838&view=rev
Log:
Merged revisions 24837 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24837 | russell | 2006-05-05 10:44:50 -0400 (Fri, 05 May 2006) | 3 lines

use pbx_checkcondition() instead of ast_true() to evaluate the condition
for MacroIf and WhileIf (issue #7086)

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_macro.c
    trunk/apps/app_while.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_macro.c?rev=24838&r1=24837&r2=24838&view=diff
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Fri May  5 09:47:22 2006
@@ -326,7 +326,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: trunk/apps/app_while.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_while.c?rev=24838&r1=24837&r2=24838&view=diff
==============================================================================
--- trunk/apps/app_while.c (original)
+++ trunk/apps/app_while.c Fri May  5 09:47:22 2006
@@ -111,7 +111,7 @@
 		} else
 			mydata = "";
 
-		if (ast_true(expr)) { 
+		if (pbx_checkcondition(expr)) { 
 			if ((app = pbx_findapp(myapp))) {
 				res = pbx_exec(chan, app, mydata);
 			} else {
@@ -277,12 +277,12 @@
 	}
 	
 
-	if ((!end && !ast_true(condition)) || (end == 2)) {
+	if ((!end && !pbx_check_condition(condition)) || (end == 2)) {
 		/* Condition Met (clean up helper vars) */
 		const char *goto_str;
 		pbx_builtin_setvar_helper(chan, varname, NULL);
 		pbx_builtin_setvar_helper(chan, my_name, NULL);
-        snprintf(end_varname,VAR_SIZE,"END_%s",varname);
+		snprintf(end_varname,VAR_SIZE,"END_%s",varname);
 		if ((goto_str=pbx_builtin_getvar_helper(chan, end_varname))) {
 			pbx_builtin_setvar_helper(chan, end_varname, NULL);
 			ast_parseable_goto(chan, goto_str);



More information about the asterisk-commits mailing list