This patch make fixes lock protection of txstat during read

from the rtcp_stats() function.
This commit is contained in:
Alfred E. Heggestad 2012-04-19 14:51:51 +00:00
parent 1534a7ee1f
commit 451eaab1c8

View file

@ -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;