Skip to content

Commit 569962f

Browse files
InterLinked1Friendly Automation
authored andcommitted
func_logic: Don't emit warning if both IF branches are empty.
The IF function currently emits warnings if both IF branches are empty. However, there is no actual necessity that either branch be non-empty as, unlike other conditional applications/ functions, nothing is inherently done with IF, and both sides could legitimately be empty. The warning is thus turned into a debug message. ASTERISK-30243 #close Change-Id: I5250625dd720f95e1859b5dfb933905d7e7a730e
1 parent 7cbf779 commit 569962f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

funcs/func_logic.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ static int acf_if(struct ast_channel *chan, const char *cmd, char *data, char *b
187187
AST_NONSTANDARD_APP_ARGS(args2, args1.remainder, ':');
188188

189189
if (ast_strlen_zero(args1.expr) || !(args2.iftrue || args2.iffalse)) {
190-
ast_log(LOG_WARNING, "Syntax IF(<expr>?[<true>][:<false>]) (expr must be non-null, and either <true> or <false> must be non-null)\n");
191-
ast_log(LOG_WARNING, " In this case, <expr>='%s', <true>='%s', and <false>='%s'\n", args1.expr, args2.iftrue, args2.iffalse);
190+
ast_debug(1, "<expr>='%s', <true>='%s', and <false>='%s'\n", args1.expr, args2.iftrue, args2.iffalse);
192191
return -1;
193192
}
194193

0 commit comments

Comments
 (0)