]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk: Fix sequence number cycling and packet loss count.
authorJoshua Colp <jcolp@digium.com>
Wed, 8 May 2019 15:41:43 +0000 (15:41 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 8 May 2019 15:41:43 +0000 (15:41 +0000)
commitece29db9bdf604a01f7ab3a50a1a7195cd2baee0
tree18b85eac525cb547d3bd495f44b2d781ec13678b
parent8357ab7e9af37545ba89842996219bbf3a3973f0
res_rtp_asterisk: Fix sequence number cycling and packet loss count.

This change fixes two bugs which both resulted in the packet loss
count exceeding 65,000.

The first issue is that the sequence number check to determine if
cycling had occurred was using the wrong variable resulting in the
check never seeing that cycling has occurred, throwing off the
packet loss calculation. It now uses the correct variable.

The second issue is that the packet loss calculation assumed that
the received number of packets in an interval could never exceed
the expected number. In practice this isn't true due to delayed
or retransmitted packets. The expected will now be updated to
the received number if the received exceeds it.

ASTERISK-28379

Change-Id: If888ebc194ab69ac3194113a808c414b014ce0f6
res/res_rtp_asterisk.c