[svn-commits] tilghman: trunk r268773 - in /trunk: channels/ channels/sip/ include/asterisk...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 7 14:52:45 CDT 2010


Author: tilghman
Date: Mon Jun  7 14:52:39 2010
New Revision: 268773

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=268773
Log:
Seems strange (and the code backs up) that if the max and min of a statistic is expressed as a double, the last value would not also need to be a double.

(closes issue #15807)
 Reported by: klaus3000

Modified:
    trunk/channels/chan_sip.c
    trunk/channels/sip/dialplan_functions.c
    trunk/include/asterisk/rtp_engine.h
    trunk/main/rtp_engine.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=268773&r1=268772&r2=268773
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jun  7 14:52:39 2010
@@ -15977,7 +15977,7 @@
 static int show_chanstats_cb(void *__cur, void *__arg, int flags)
 {
 #define FORMAT2 "%-15.15s  %-11.11s  %-8.8s %-10.10s  %-10.10s (     %%) %-6.6s %-10.10s  %-10.10s (     %%) %-6.6s\n"
-#define FORMAT  "%-15.15s  %-11.11s  %-8.8s %-10.10u%-1.1s %-10.10u (%5.2f%%) %-6.6u %-10.10u%-1.1s %-10.10u (%5.2f%%) %-6.6u\n"
+#define FORMAT  "%-15.15s  %-11.11s  %-8.8s %-10.10u%-1.1s %-10.10u (%5.2f%%) %-6.4lf %-10.10u%-1.1s %-10.10u (%5.2f%%) %-6.4lf\n"
 	struct sip_pvt *cur = __cur;
 	struct ast_rtp_instance_stats stats;
 	char durbuf[10];

Modified: trunk/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sip/dialplan_functions.c?view=diff&rev=268773&r1=268772&r2=268773
==============================================================================
--- trunk/channels/sip/dialplan_functions.c (original)
+++ trunk/channels/sip/dialplan_functions.c Mon Jun  7 14:52:39 2010
@@ -167,8 +167,8 @@
 			} lookup[] = {
 				{ "txcount",               INT, { .i4 = &stats.txcount, }, },
 				{ "rxcount",               INT, { .i4 = &stats.rxcount, }, },
-				{ "txjitter",              INT, { .i4 = &stats.txjitter, }, },
-				{ "rxjitter",              INT, { .i4 = &stats.rxjitter, }, },
+				{ "txjitter",              DBL, { .d8 = &stats.txjitter, }, },
+				{ "rxjitter",              DBL, { .d8 = &stats.rxjitter, }, },
 				{ "remote_maxjitter",      DBL, { .d8 = &stats.remote_maxjitter, }, },
 				{ "remote_minjitter",      DBL, { .d8 = &stats.remote_minjitter, }, },
 				{ "remote_normdevjitter",  DBL, { .d8 = &stats.remote_normdevjitter, }, },
@@ -187,7 +187,7 @@
 				{ "local_minrxploss",      DBL, { .d8 = &stats.local_minrxploss, }, },
 				{ "local_normdevrxploss",  DBL, { .d8 = &stats.local_normdevrxploss, }, },
 				{ "local_stdevrxploss",    DBL, { .d8 = &stats.local_stdevrxploss, }, },
-				{ "rtt",                   INT, { .i4 = &stats.rtt, }, },
+				{ "rtt",                   DBL, { .d8 = &stats.rtt, }, },
 				{ "maxrtt",                DBL, { .d8 = &stats.maxrtt, }, },
 				{ "minrtt",                DBL, { .d8 = &stats.minrtt, }, },
 				{ "normdevrtt",            DBL, { .d8 = &stats.normdevrtt, }, },

Modified: trunk/include/asterisk/rtp_engine.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/rtp_engine.h?view=diff&rev=268773&r1=268772&r2=268773
==============================================================================
--- trunk/include/asterisk/rtp_engine.h (original)
+++ trunk/include/asterisk/rtp_engine.h Mon Jun  7 14:52:39 2010
@@ -235,9 +235,9 @@
 	/*! Number of packets received */
 	unsigned int rxcount;
 	/*! Jitter on transmitted packets */
-	unsigned int txjitter;
+	double txjitter;
 	/*! Jitter on received packets */
-	unsigned int rxjitter;
+	double rxjitter;
 	/*! Maximum jitter on remote side */
 	double remote_maxjitter;
 	/*! Minimum jitter on remote side */
@@ -275,7 +275,7 @@
 	/*! Standard deviation packets lost on local side */
 	double local_stdevrxploss;
 	/*! Total round trip time */
-	unsigned int rtt;
+	double rtt;
 	/*! Maximum round trip time */
 	double maxrtt;
 	/*! Minimum round trip time */

Modified: trunk/main/rtp_engine.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/rtp_engine.c?view=diff&rev=268773&r1=268772&r2=268773
==============================================================================
--- trunk/main/rtp_engine.c (original)
+++ trunk/main/rtp_engine.c Mon Jun  7 14:52:39 2010
@@ -1518,7 +1518,7 @@
 
 	/* Now actually fill the buffer with the good information */
 	if (field == AST_RTP_INSTANCE_STAT_FIELD_QUALITY) {
-		snprintf(buf, size, "ssrc=%i;themssrc=%u;lp=%u;rxjitter=%u;rxcount=%u;txjitter=%u;txcount=%u;rlp=%u;rtt=%u",
+		snprintf(buf, size, "ssrc=%i;themssrc=%u;lp=%u;rxjitter=%f;rxcount=%u;txjitter=%f;txcount=%u;rlp=%u;rtt=%f",
 			 stats.local_ssrc, stats.remote_ssrc, stats.rxploss, stats.txjitter, stats.rxcount, stats.rxjitter, stats.txcount, stats.txploss, stats.rtt);
 	} else if (field == AST_RTP_INSTANCE_STAT_FIELD_QUALITY_JITTER) {
 		snprintf(buf, size, "minrxjitter=%f;maxrxjitter=%f;avgrxjitter=%f;stdevrxjitter=%f;reported_minjitter=%f;reported_maxjitter=%f;reported_avgjitter=%f;reported_stdevjitter=%f;",




More information about the svn-commits mailing list