<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/7461">View Change</a></p><p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(3 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/7461/4/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/7461/4/channels/chan_sip.c@15602">Patch Set #4, Line 15602:</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 (!vars) {<br>          astman_send_error(s, m, "Message variables (vars) is NULL");<br>                return 0;<br>     }<br><br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think this check is necessary and may actually be undesirable.  The code doesn't require that there be Variable headers in the AMI action.  I think the documentation of SIPnotify stating that it is required is in error.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7461/4/channels/chan_sip.c@15623">Patch Set #4, Line 15623:</a> <code style="font-family:monospace,monospace">           p = ao2_find(dialogs, &tmp_dialog, OBJ_POINTER);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">OBJ_POINTER is deprecated and replaced with OBJ_SEARCH_OBJECT.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7461/4/channels/chan_sip.c@15683">Patch Set #4, Line 15683:</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;">              dialog_unref(p, "bump down the count of p since we're done with it.");<br>  } else {<br>              sip_scheddestroy(p, SIP_TRANS_TIMEOUT);<br>               transmit_invite(p, SIP_NOTIFY, 0, 1, NULL);<br>           dialog_unref(p, "bump down the count of p since we're done with it.");<br>  }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The dialog_unref() is common code to both if clauses.  It can be moved to after the if/else statement:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (...) {<br>  ...<br>} else {<br>  ...<br>}<br>dialog_unref(p...)</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/7461">change 7461</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/7461"/><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: I5797ded4752acd966db6b13971284db684cc5ab4 </div>
<div style="display:none"> Gerrit-Change-Number: 7461 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Yasuhiko Kamata <yasuhiko.kamata@nxtg.co.jp> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.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-Reviewer: Yasuhiko Kamata <yasuhiko.kamata@nxtg.co.jp> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 11 Dec 2017 18:52:52 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>