<p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15908">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15908/4/funcs/func_ochannel.c">File funcs/func_ochannel.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/asterisk/+/15908/4/funcs/func_ochannel.c@83">Patch Set #4, Line 83:</a> <code style="font-family:monospace,monospace">         ast_log(LOG_ERROR, "Channel '%s' not found!  Variable '%s' will be blank.\n", args.channel, args.var);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think this should be an error as it is quite possible for an arbitrary "other" channel to disappear at any time.  A debug msg at best.  Really should not have any msg.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15908/4/funcs/func_ochannel.c@86">Patch Set #4, Line 86:</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 (!args.var) {<br>         ast_log(LOG_WARNING, "No variable name was provided to %s function.\n", function);<br>          return -1;<br>    }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This check should be done before getting ochan.  Otherwise we have a ref leak of ochan.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15908/4/funcs/func_ochannel.c@93">Patch Set #4, Line 93:</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 (ochan) {<br>              ast_channel_unref(ochan);<br>     }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">At this point ochan is never NULL.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15908/4/funcs/func_ochannel.c@116">Patch Set #4, Line 116:</a> <code style="font-family:monospace,monospace">            ast_log(LOG_WARNING, "Channel '%s' not found!  Variable '%s' will be blank.\n", args.channel, args.var);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think this should be a warning as it is quite possible for an arbitrary "other" channel to disappear at any time.  A debug msg at best.  Really should not have any msg.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15908/4/funcs/func_ochannel.c@119">Patch Set #4, Line 119:</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 (!args.var) {<br>            ast_log(LOG_WARNING, "No variable name was provided to %s function.\n", function);<br>          return -1;<br>    }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This check should be done before getting ochan.  Otherwise we have a ref leak of ochan.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15908/4/funcs/func_ochannel.c@125">Patch Set #4, Line 125:</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 (ochan) {<br>            ast_channel_unref(ochan);<br>     }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">At this point ochan is never NULL.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15908">change 15908</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/+/15908"/><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: I7492645ae4307553d0f586d78e13a4f586231fdf </div>
<div style="display:none"> Gerrit-Change-Number: 15908 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-CC: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 17 May 2021 18:43:43 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>