[svn-commits] oej: branch 1.4 r61676 - /branches/1.4/main/rtp.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Apr 18 13:46:24 MST 2007


Author: oej
Date: Wed Apr 18 15:46:23 2007
New Revision: 61676

URL: http://svn.digium.com/view/asterisk?view=rev&rev=61676
Log:
Clean upp formatting, add some doxygen stuff while we're in cleaning mode... Thanks Kevin!

Modified:
    branches/1.4/main/rtp.c

Modified: branches/1.4/main/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/rtp.c?view=diff&rev=61676&r1=61675&r2=61676
==============================================================================
--- branches/1.4/main/rtp.c (original)
+++ branches/1.4/main/rtp.c Wed Apr 18 15:46:23 2007
@@ -143,8 +143,8 @@
 	unsigned int dtmfsamples;
 	/* DTMF Transmission Variables */
 	unsigned int lastdigitts;
-	char sending_digit;	/* boolean - are we sending digits */
-	char send_digit;	/* digit we are sending */
+	char sending_digit;	/*!< boolean - are we sending digits */
+	char send_digit;	/*!< digit we are sending */
 	int send_payload;
 	int send_duration;
 	int nat;
@@ -925,27 +925,27 @@
 				lsr = (double)((ntohl(rtcpheader[i + 4]) & 0xffff0000) >> 16) + (double)((double)(ntohl(rtcpheader[i + 4]) & 0xffff) / 1000000.);
 				dlsr = (double)(ntohl(rtcpheader[i + 5])/65536.);
 				rtt = a - dlsr - lsr;
-				if (rtt>=0) {
-				rtp->rtcp->accumulated_transit += rtt;
-				rtp->rtcp->rtt = rtt;
-				if (rtp->rtcp->maxrtt<rtt)
-					rtp->rtcp->maxrtt = rtt;
-				if (rtp->rtcp->minrtt>rtt)
-				rtp->rtcp->minrtt = rtt;
-			}
+				if (rtt >= 0) {
+					rtp->rtcp->accumulated_transit += rtt;
+					rtp->rtcp->rtt = rtt;
+					if (rtp->rtcp->maxrtt < rtt)
+						rtp->rtcp->maxrtt = rtt;
+					if (rtp->rtcp->minrtt > rtt)
+						rtp->rtcp->minrtt = rtt;
+				}
 			}
 			rtp->rtcp->reported_jitter = ntohl(rtcpheader[i + 3]);
 			rtp->rtcp->reported_lost = ntohl(rtcpheader[i + 1]) & 0xffffff;
 			if (rtcp_debug_test_addr(&sin)) {
-				ast_verbose("Fraction lost: %ld\n", (((long) ntohl(rtcpheader[i + 1]) & 0xff000000) >> 24));
-				ast_verbose("Packets lost so far: %d\n", rtp->rtcp->reported_lost);
-				ast_verbose("Highest sequence number: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff));
-				ast_verbose("Sequence number cycles: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff) >> 16);
-				ast_verbose("Interarrival jitter: %u\n", rtp->rtcp->reported_jitter);
-				ast_verbose("Last SR(our NTP): %lu.%010lu\n",(unsigned long) ntohl(rtcpheader[i + 4]) >> 16,((unsigned long) ntohl(rtcpheader[i + 4]) << 16) * 4096);
-				ast_verbose("DLSR: %4.4f (sec)\n",ntohl(rtcpheader[i + 5])/65536.0);
+				ast_verbose("  Fraction lost: %ld\n", (((long) ntohl(rtcpheader[i + 1]) & 0xff000000) >> 24));
+				ast_verbose("  Packets lost so far: %d\n", rtp->rtcp->reported_lost);
+				ast_verbose("  Highest sequence number: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff));
+				ast_verbose("  Sequence number cycles: %ld\n", (long) (ntohl(rtcpheader[i + 2]) & 0xffff) >> 16);
+				ast_verbose("  Interarrival jitter: %u\n", rtp->rtcp->reported_jitter);
+				ast_verbose("  Last SR(our NTP): %lu.%010lu\n",(unsigned long) ntohl(rtcpheader[i + 4]) >> 16,((unsigned long) ntohl(rtcpheader[i + 4]) << 16) * 4096);
+				ast_verbose("  DLSR: %4.4f (sec)\n",ntohl(rtcpheader[i + 5])/65536.0);
 				if (rtt)
-					ast_verbose("RTT: %f(sec)\n", rtt);
+					ast_verbose("  RTT: %f(sec)\n", rtt);
 			}
 			break;
 		case RTCP_PT_FUR:



More information about the svn-commits mailing list