This patch make fixes lock protection of txstat during read
from the rtcp_stats() function.
This commit is contained in:
parent
1534a7ee1f
commit
451eaab1c8
1 changed files with 3 additions and 0 deletions
|
@ -564,7 +564,10 @@ int rtcp_stats(struct rtp_sock *rs, uint32_t ssrc, struct rtcp_stats *stats)
|
|||
if (!mbr)
|
||||
return ENOENT;
|
||||
|
||||
lock_read_get(sess->lock);
|
||||
stats->tx.sent = sess->txstat.psent;
|
||||
lock_rel(sess->lock);
|
||||
|
||||
stats->tx.lost = mbr->cum_lost;
|
||||
stats->tx.jit = mbr->jit;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue