<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19349">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">func_logic: Don't emit warning if both IF branches are empty.<br><br>The IF function currently emits warnings if both IF branches<br>are empty. However, there is no actual necessity that either<br>branch be non-empty as, unlike other conditional applications/<br>functions, nothing is inherently done with IF, and both<br>sides could legitimately be empty. The warning is thus turned<br>into a debug message.<br><br>ASTERISK-30243 #close<br><br>Change-Id: I5250625dd720f95e1859b5dfb933905d7e7a730e<br>---<br>M funcs/func_logic.c<br>1 file changed, 19 insertions(+), 2 deletions(-)<br><br></pre>
<pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/funcs/func_logic.c b/funcs/func_logic.c</span><br><span>index e62ae54..b1411f2 100644</span><br><span>--- a/funcs/func_logic.c</span><br><span>+++ b/funcs/func_logic.c</span><br><span>@@ -187,8 +187,7 @@</span><br><span>   AST_NONSTANDARD_APP_ARGS(args2, args1.remainder, ':');</span><br><span> </span><br><span>   if (ast_strlen_zero(args1.expr) || !(args2.iftrue || args2.iffalse)) {</span><br><span style="color: hsl(0, 100%, 40%);">-          ast_log(LOG_WARNING, "Syntax IF(<expr>?[<true>][:<false>])  (expr must be non-null, and either <true> or <false> must be non-null)\n");</span><br><span style="color: hsl(0, 100%, 40%);">-         ast_log(LOG_WARNING, "      In this case, <expr>='%s', <true>='%s', and <false>='%s'\n", args1.expr, args2.iftrue, args2.iffalse);</span><br><span style="color: hsl(120, 100%, 40%);">+                ast_debug(1, "<expr>='%s', <true>='%s', and <false>='%s'\n", args1.expr, args2.iftrue, args2.iffalse);</span><br><span>           return -1;</span><br><span>   }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19349">change 19349</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/19349"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I5250625dd720f95e1859b5dfb933905d7e7a730e </div>
<div style="display:none"> Gerrit-Change-Number: 19349 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>