Re #1782 (misc): Fixed inaccurate TX packet loss percentage and stats calculation.

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@4977 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Sauw Ming 2015-01-23 04:00:34 +00:00
parent d29d511fb2
commit 4d14f25e70
1 changed files with 3 additions and 3 deletions

View File

@ -166,11 +166,11 @@ static unsigned dump_media_stat(const char *indent,
indent,
stat->tx.loss,
(stat->tx.loss? stat->tx.loss * 100.0 / (stat->tx.pkt + stat->tx.loss) : 0),
(stat->tx.loss? stat->tx.loss * 100.0 / stat->tx.pkt : 0),
stat->tx.dup,
(stat->tx.dup? stat->tx.dup * 100.0 / (stat->tx.pkt + stat->tx.loss) : 0),
(stat->tx.dup? stat->tx.dup * 100.0 / stat->tx.pkt : 0),
stat->tx.reorder,
(stat->tx.reorder? stat->tx.reorder * 100.0 / (stat->tx.pkt + stat->tx.loss) : 0),
(stat->tx.reorder? stat->tx.reorder * 100.0 / stat->tx.pkt : 0),
indent, indent,
stat->tx.loss_period.min / 1000.0,