<p style="white-space: pre-wrap; word-wrap: break-word;">Going to update the patchset shortly.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/10930">View Change</a></p><p>10 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/10930/7/channels/chan_iax2.c">File channels/chan_iax2.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/channels/chan_iax2.c@3875">Patch Set #7, Line 3875:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">                      for (v = peer->vars; v; v = v->next)<br>                            ast_cli(a->fd, "                 %s = %s\n", v->name, v->value);<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">'for' loop needs braces.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/10930/7/include/asterisk/config.h">File include/asterisk/config.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/include/asterisk/config.h@372">Patch Set #7, Line 372:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">* \param variable list to update<br> * \param variable name to search<br> * \param variable new value<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">You need to replace 'variable' with the name of the actual parameter.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Oops, the draft code got past me.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/include/asterisk/config.h@377">Patch Set #7, Line 377:</a> <code style="font-family:monospace,monospace"> * Goes through a lst of variables and updates it's value</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">lst -> list […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Sorry, not a native english speaker, I keep maaking the it's/its error. Thanks for correcting me!</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/include/asterisk/config.h@382">Patch Set #7, Line 382:</a> <code style="font-family:monospace,monospace">int ast_var_update(struct ast_variable *vars, char *varname, char *varval);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Needs to take a 'struct ast_variable **' or return a 'struct variable *' - see note in config.c. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/10930/7/main/config.c">File main/config.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/main/config.c@839">Patch Set #7, Line 839:</a> <code style="font-family:monospace,monospace">int ast_var_update(struct ast_variable *vars, char *varname, char *varval)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Because you could be adding or replacing the head of this list, this needs to either take a struct a […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I see.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm going to pass this a struct ast_variable **, which requires less modifications to consumers.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/main/config.c@841">Patch Set #7, Line 841:</a> <code style="font-family:monospace,monospace">     struct ast_variable *cur = NULL, *prev = NULL, *tmpvar = NULL;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Defaulting cur and tmpvar is unnecessary as they will be initialized before use.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/main/config.c@843">Patch Set #7, Line 843:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if(!(tmpvar = ast_variable_new(varname, varval, ""))) {<br>           return -1;<br>    }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Split this into two lines. The assignment to tmpvar, and then the NULL check.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/main/config.c@848">Patch Set #7, Line 848:</a> <code style="font-family:monospace,monospace">               if(!strcmp(varname, cur->name)) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Space after 'if'</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/main/config.c@850">Patch Set #7, Line 850:</a> <code style="font-family:monospace,monospace">                     if(prev == NULL)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Space after 'if' and this if/else block needs braces.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10930/7/main/config.c@861">Patch Set #7, Line 861:</a> <code style="font-family:monospace,monospace">    vars = tmpvar;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">See comment above, this is not going to update the caller's variable list.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/10930">change 10930</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/+/10930"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie1897a96c82b8945e752733612ee963686f32839 </div>
<div style="display:none"> Gerrit-Change-Number: 10930 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: Guido Falsi <madpilot@freebsd.org> </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-Reviewer: Guido Falsi <madpilot@freebsd.org> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 23 Mar 2019 08:46:23 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>