<p style="white-space: pre-wrap; word-wrap: break-word;">Thank you for your kind reviewing.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I've updated commit. But I'm not clear about res/ari/resource_channels.c:1989. Can I get some help?</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/7/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/7/main/rtp_engine.c@3767">Patch Set #7, Line 3767:</a> <code style="font-family:monospace,monospace">  SET_AST_JSON_OBJ(j_res, "txcount", ast_json_integer_create(stats->txcount));</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I think jj_res should just not be created if any of these fail. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Agree. Changed it to check the return values to make sure it was actually created.</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@1969">Patch Set #7, Line 1969:</a> <code style="font-family:monospace,monospace"></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Channel is not locked during this period of time and should be, otherwise you have no guarantee that […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks, added chan lock/unlock.</p></li><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@1984">Patch Set #7, Line 1984:</a> <code style="font-family:monospace,monospace">        ret = glue->get_rtp_info(chan, &rtp);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">You need to ensure ao2_cleanup is called on rtp or else the RTP instance will leak.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks, added RAII_VAR() for that.</p></li><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;">Even if forbid there are cases where rtp will be present, so check for that instead.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not clear how this should be done. Could I get some help?</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: 8 </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 Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 10 Mar 2019 20:56:45 +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: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>