<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7553">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins2: Verified
  George Joseph: Looks good to me, approved; Approved for Submit

</div><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;">diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c<br>index 4106e9e..242fb58 100644<br>--- a/res/res_rtp_asterisk.c<br>+++ b/res/res_rtp_asterisk.c<br>@@ -4217,7 +4217,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>@@ -4471,7 +4470,7 @@<br>                          if (!report_block) {<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>@@ -4508,7 +4507,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/7553">change 7553</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/7553"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/13.13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116 </div>
<div style="display:none"> Gerrit-Change-Number: 7553 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>