mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
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) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -326,7 +326,7 @@ static int macroif_exec(struct ast_channel *chan, void *data)
|
|||||||
*label_b = '\0';
|
*label_b = '\0';
|
||||||
label_b++;
|
label_b++;
|
||||||
}
|
}
|
||||||
if (ast_true(expr))
|
if (pbx_checkcondition(expr))
|
||||||
macro_exec(chan, label_a);
|
macro_exec(chan, label_a);
|
||||||
else if (label_b)
|
else if (label_b)
|
||||||
macro_exec(chan, label_b);
|
macro_exec(chan, label_b);
|
||||||
|
@@ -111,7 +111,7 @@ static int execif_exec(struct ast_channel *chan, void *data) {
|
|||||||
} else
|
} else
|
||||||
mydata = "";
|
mydata = "";
|
||||||
|
|
||||||
if (ast_true(expr)) {
|
if (pbx_checkcondition(expr)) {
|
||||||
if ((app = pbx_findapp(myapp))) {
|
if ((app = pbx_findapp(myapp))) {
|
||||||
res = pbx_exec(chan, app, mydata);
|
res = pbx_exec(chan, app, mydata);
|
||||||
} else {
|
} else {
|
||||||
@@ -277,7 +277,7 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((!end && !ast_true(condition)) || (end == 2)) {
|
if ((!end && !pbx_check_condition(condition)) || (end == 2)) {
|
||||||
/* Condition Met (clean up helper vars) */
|
/* Condition Met (clean up helper vars) */
|
||||||
const char *goto_str;
|
const char *goto_str;
|
||||||
pbx_builtin_setvar_helper(chan, varname, NULL);
|
pbx_builtin_setvar_helper(chan, varname, NULL);
|
||||||
|
Reference in New Issue
Block a user