<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/6119">View Change</a></p><p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p style="white-space: pre-wrap; word-wrap: break-word;">A note in the CHANGES file is needed to let people know about the new function.</p><p>(5 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/6119/2/channels/chan_sip.c">File channels/chan_sip.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6119/2/channels/chan_sip.c@400">Patch Set #2, Line 400:</a> <code style="font-family:monospace,monospace">                        you may use <literal>${SIP_HEADERS(X-)}</literal> to enumerate optional extended</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Tab in the middle of the line between "may use".</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6119/2/channels/chan_sip.c@23092">Patch Set #2, Line 23092:</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;">  SCOPED_CHANNELLOCK(chanlock, chan);<br><br> if (!chan) {<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Using SCOPED_CHANNELLOCK() and then testing if chan is NULL doesn't work.  We will segfault on the lock before we test if it is NULL.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6119/2/channels/chan_sip.c@23108">Patch Set #2, Line 23108:</a> <code style="font-family:monospace,monospace">    AST_STANDARD_APP_ARGS(args, data);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This modifies the data string.  The usual code copies to a local string before parsing to avoid the side effect:<br>parse = ast_strdupa(data);<br>AST_STANDARD_APP_ARGS(args, parse);</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6119/2/channels/chan_sip.c@23115">Patch Set #2, Line 23115:</a> <code style="font-family:monospace,monospace">          if (ast_begins_with(header, args.pattern)) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Could check for '*' to mean match any header for compatibility with the REFER match using '*' to match all.  See the REFER review: https://gerrit.asterisk.org/#/c/6118/</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6119/2/channels/chan_sip.c@23119">Patch Set #2, Line 23119:</a> <code style="font-family:monospace,monospace">                         struct ast_str *token = ast_str_alloca(100);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Need to pull the ast_str_alloca() out of the loop because it allocates stack memory for every loop iteration.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/6119">change 6119</a>. To unsubscribe, 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/6119"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I2076d3893d03a2f82429f393b5b46db6cf68a267 </div>
<div style="display:none"> Gerrit-Change-Number: 6119 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Kirill Katsnelson <kkm@smartaction.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 01 Aug 2017 18:53:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>