<p>Patch set 9:<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/+/11083">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11083/9/main/rtp_engine.c">File main/rtp_engine.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/11083/9/main/rtp_engine.c@3769">Patch Set #9, Line 3769:</a> <code style="font-family:monospace,monospace">   ret = 0;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You don't need to set ret = 0; here, for the first thing you can just use ret = instead of ret |=.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11083/9/main/rtp_engine.c@3784">Patch Set #9, Line 3784:</a> <code style="font-family:monospace,monospace">                ast_log(LOG_WARNING, "Could not create rtp statistics info.\n");</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think this WARNING is useful. There's no real information available to allow someone to understand where it came from (like a channel) or why, so it can just become a scary WARNING message for users.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11083/9/main/rtp_engine.c@3831">Patch Set #9, Line 3831:</a> <code style="font-family:monospace,monospace">     j_res = ast_rtp_convert_stats_json(&stats);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">In the future you don't need to store things like this in a variable if you are immediately returning, you can just do a return ast_rtp_convert_stats_json(&stats);</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11083/7/res/ari/resource_channels.c">File res/ari/resource_channels.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/11083/7/res/ari/resource_channels.c@1985">Patch Set #7, Line 1985:</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 (ret == AST_RTP_GLUE_RESULT_FORBID) {<br>              ast_ari_response_error(response, 404, "Not Found",<br>                  "RTP info not found");<br>              return;<br>       }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I'm not clear how this should be done. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Instead of checking if ret == AST_RTP_GLUE_RESULT_FORBID, initialize rtp to NULL, and check if it's NULL here instead.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11083">change 11083</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/+/11083"/><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: I4343eec070438cec13f2a4f22e7fd9e574381376 </div>
<div style="display:none"> Gerrit-Change-Number: 11083 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 13 Mar 2019 10:47:12 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Comment-In-Reply-To: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Comment-In-Reply-To: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>