<p>Matthew Fredrickson <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/9225">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>(5 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/9225/4/main/data_buffer.c">File main/data_buffer.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9225/4/main/data_buffer.c@297">Patch Set #4, Line 297:</a> <code style="font-family:monospace,monospace"> if (buffer->cache_count < CACHED_PAYLOAD_MAX</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Since it looks like you're doing the cache population with the same code twice (both in ast_data_buffer_remove and ast_data_buffer_remove_head), would it be prudent to make it a function?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9225/4/main/data_buffer.c@324">Patch Set #4, Line 324:</a> <code style="font-family:monospace,monospace"> if (buffer->cache_count < CACHED_PAYLOAD_MAX</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same here - unless I read it wrong, the next few lines of adding an item to the cached_payloads list are the same between this and the above function.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/9225/4/res/res_rtp_asterisk.c">File res/res_rtp_asterisk.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9225/4/res/res_rtp_asterisk.c@4402">Patch Set #4, Line 4402:</a> <code style="font-family:monospace,monospace"> if (res == 0 || res == 1) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is probably silly, but unless we're actually using both failure values, I'd prefer to stick to something simpler as far as failure response. So return 0 for both failure conditions, otherwise res > 0 is success. If you want to qualify between both types of errors, you could add an ast_debug message at error time within ast_rtcp_generate_report or ast_rtcp_generate_sdes</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9225/4/res/res_rtp_asterisk.c@4411">Patch Set #4, Line 4411:</a> <code style="font-family:monospace,monospace"> if (res == 0 || res == 1) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same here.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9225/4/res/res_rtp_asterisk.c@4419">Patch Set #4, Line 4419:</a> <code style="font-family:monospace,monospace"> ast_rtp_instance_get_remote_address(instance, &remote_address);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Why do we have to update remote_address here?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/9225">change 9225</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/9225"/><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: Idab644b08a1593659c92cda64132ccc203fe991d </div>
<div style="display:none"> Gerrit-Change-Number: 9225 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 28 Jun 2018 11:04:20 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>