]> 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:44:02 +0000 (09:44 -0600)
commit7a6fd83aca3dc3216ec0fc273388afa529736afd
treedf56c5a9faad21f68d801d8e2df9eeef5b2dc8e2
parentfca9f0a4adeba6ef3994f17cc46ece420d501b24
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