From e11298d219b4fa80862e5cc3f04040ce4c9ac661 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 29 Jun 2006 09:41:34 +0000 Subject: Fixed minor bug in the display of packet loss percentage git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@565 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/samples/streamutil.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pjsip-apps/src/samples/streamutil.c') diff --git a/pjsip-apps/src/samples/streamutil.c b/pjsip-apps/src/samples/streamutil.c index ca19fb60..20544276 100644 --- a/pjsip-apps/src/samples/streamutil.c +++ b/pjsip-apps/src/samples/streamutil.c @@ -604,11 +604,11 @@ static void print_stream_stat(pjmedia_stream *stream) good_number(ipbytes, stat.rx.bytes + stat.rx.pkt * 32), "", stat.rx.loss, - stat.rx.loss * 100.0 / stat.rx.pkt, + stat.rx.loss * 100.0 / (stat.rx.pkt + stat.rx.loss), stat.rx.dup, - stat.rx.dup * 100.0 / stat.rx.pkt, + stat.rx.dup * 100.0 / (stat.rx.pkt + stat.rx.dup), stat.rx.reorder, - stat.rx.reorder * 100.0 / stat.rx.pkt, + stat.rx.reorder * 100.0 / (stat.rx.pkt + stat.rx.reorder), "", stat.rx.loss_period.min / 1000.0, stat.rx.loss_period.avg / 1000.0, @@ -647,11 +647,11 @@ static void print_stream_stat(pjmedia_stream *stream) good_number(ipbytes, stat.tx.bytes + stat.tx.pkt * 32), "", stat.tx.loss, - stat.tx.loss * 100.0 / stat.tx.pkt, + stat.tx.loss * 100.0 / (stat.tx.pkt + stat.tx.loss), stat.tx.dup, - stat.tx.dup * 100.0 / stat.tx.pkt, + stat.tx.dup * 100.0 / (stat.tx.pkt + stat.tx.dup), stat.tx.reorder, - stat.tx.reorder * 100.0 / stat.tx.pkt, + stat.tx.reorder * 100.0 / (stat.tx.pkt + stat.tx.reorder), "", stat.tx.loss_period.min / 1000.0, stat.tx.loss_period.avg / 1000.0, -- cgit v1.2.3