<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17676">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app.c: Throw warnings for nonexistent options<br><br>Currently, Asterisk doesn't throw warnings if options<br>are passed into applications that don't accept them.<br>This can confuse users if they're unaware that they<br>are doing something wrong.<br><br>This adds an additional check to parse_options so that<br>a warning is thrown anytime an option is parsed that<br>doesn't exist in the parsing application, so that users<br>are notified of the invalid usage.<br><br>ASTERISK-29801 #close<br><br>Change-Id: Id029274a57135caca193c913307a63fd75e24679<br>---<br>M main/app.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/76/17676/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/app.c b/main/app.c</span><br><span>index 3263579..df6ffa2 100644</span><br><span>--- a/main/app.c</span><br><span>+++ b/main/app.c</span><br><span>@@ -2814,6 +2814,9 @@</span><br><span>                } else if (argloc) {</span><br><span>                         args[argloc - 1] = "";</span><br><span>             }</span><br><span style="color: hsl(120, 100%, 40%);">+             if (!options[curarg].flag) {</span><br><span style="color: hsl(120, 100%, 40%);">+                  ast_log(LOG_WARNING, "Unrecognized option: '%c'\n", curarg);</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span>            if (flaglen == 32) {</span><br><span>                         ast_set_flag(flags, options[curarg].flag);</span><br><span>           } else {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17676">change 17676</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/+/17676"/><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: Id029274a57135caca193c913307a63fd75e24679 </div>
<div style="display:none"> Gerrit-Change-Number: 17676 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>