<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7551">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">AST-2017-012: Place single RTCP report block at beginning of report.<br><br>When the RTCP code was transitioned over to Stasis a code change<br>was made to keep track of how many reports are present. This count<br>controlled where report blocks were placed in the RTCP report.<br><br>If a compound RTCP packet was received this logic would incorrectly<br>place a report block in the wrong location resulting in a write<br>to an invalid location.<br><br>This change removes this counting logic and always places the report<br>block at the first position. If in the future multiple reports are<br>supported the logic can be extended but for now keeping a count<br>serves no purpose.<br><br>ASTERISK-27382<br>ASTERISK-27429<br><br>Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 1 insertion(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/51/7551/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c<br>index 16eb7dd..2f76468 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -5169,7 +5169,6 @@<br> unsigned int first_word;<br> /*! True if we have seen an acceptable SSRC to learn the remote RTCP address */<br> unsigned int ssrc_seen;<br>- int report_counter = 0;<br> struct ast_rtp_rtcp_report_block *report_block;<br> struct ast_frame *f = &ast_null_frame;<br> <br>@@ -5413,7 +5412,7 @@<br> }<br> return &ast_null_frame;<br> }<br>- rtcp_report->report_block[report_counter] = report_block;<br>+ rtcp_report->report_block[0] = report_block;<br> report_block->source_ssrc = ntohl(rtcpheader[i]);<br> report_block->lost_count.packets = ntohl(rtcpheader[i + 1]) & 0x00ffffff;<br> report_block->lost_count.fraction = ((ntohl(rtcpheader[i + 1]) & 0xff000000) >> 24);<br>@@ -5450,7 +5449,6 @@<br> ast_verbose(" DLSR: %4.4f (sec)\n",(double)report_block->dlsr / 65536.0);<br> ast_verbose(" RTT: %4.4f(sec)\n", rtp->rtcp->rtt);<br> }<br>- report_counter++;<br> }<br> /* If and when we handle more than one report block, this should occur outside<br> * this loop.<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7551">change 7551</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/7551"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116 </div>
<div style="display:none"> Gerrit-Change-Number: 7551 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>