[asterisk-commits] oej: branch 1.6.2 r215887 - in /branches/1.6.2: channels/chan_sip.c main/rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 3 07:24:35 CDT 2009


Author: oej
Date: Thu Sep  3 07:24:30 2009
New Revision: 215887

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215887
Log:
Fix bad reports in "sip show channelstats".

Not directly mergeable in svn trunk, needs more tests, therefore committed directly to 1.6.2.
(closes issue #15819)
Reported by: klaus3000
Patches: 
      asterisk-1.6.2-beta4-sipshowchannelstats-patch-0.2.txt uploaded by klaus3000 (license 65)
Tested by: klaus3000, oej


Modified:
    branches/1.6.2/channels/chan_sip.c
    branches/1.6.2/main/rtp.c

Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=215887&r1=215886&r2=215887
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Thu Sep  3 07:24:30 2009
@@ -15366,12 +15366,12 @@
 		rxcount > (unsigned int) 100000 ? (unsigned int) (rxcount)/(unsigned int) 1000 : rxcount,
 		rxcount > (unsigned int) 100000 ? "K":" ",
 		ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS),
-		rxcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) ? (unsigned int) (ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) / rxcount * 100) : 0,
+		rxcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) ? (unsigned int) ((double) ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) / (ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXPLOSS) + rxcount) * 100) : 0,
 		ast_rtp_get_qosvalue(cur->rtp, AST_RTP_RXJITTER),
 		txcount > (unsigned int) 100000 ? (unsigned int) (txcount)/(unsigned int) 1000 : txcount,
 		txcount > (unsigned int) 100000 ? "K":" ",
 		ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS),
-		txcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS) ? (unsigned int) (ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS)/ txcount * 100) : 0,
+		txcount > ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS) ? (unsigned int) ((double) ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXPLOSS)/ txcount * 100) : 0,
 		ast_rtp_get_qosvalue(cur->rtp, AST_RTP_TXJITTER)
 	);
 	arg->numchans++;

Modified: branches/1.6.2/main/rtp.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/main/rtp.c?view=diff&rev=215887&r1=215886&r2=215887
==============================================================================
--- branches/1.6.2/main/rtp.c (original)
+++ branches/1.6.2/main/rtp.c Thu Sep  3 07:24:30 2009
@@ -2768,7 +2768,7 @@
 	case AST_RTP_RXCOUNT:
 		return (unsigned int) rtp->rxcount;
 	case AST_RTP_TXJITTER:
-		return (unsigned int) (rtp->rxjitter * 100.0);
+		return (unsigned int) (rtp->rxjitter * 1000.0);
 	case AST_RTP_RXJITTER:
 		return (unsigned int) (rtp->rtcp ? (rtp->rtcp->reported_jitter / (unsigned int) 65536.0) : 0);
 	case AST_RTP_RXPLOSS:




More information about the asterisk-commits mailing list