[Sumover-dev] [svn commit] r4314 - vic/branches/cc/rtp

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Wed Nov 12 19:29:55 GMT 2008


Author: soohyunc
Date: Wed Nov 12 19:29:54 2008
New Revision: 4314

Modified:
   vic/branches/cc/rtp/session.cpp

Log:
o  (bug fix)
   at cc_output() in rtp/session.cpp, the location of "output(pb)" and the
   declaration of "pktbuf* nx = pb->next" is important. in the previous case,
   the next packet pointer was assigned after sending and purging the current
   packet. this may end up that the next packet is pointing a wrong pointer.
   this is fixed now.
o  added some debug messages for the debugging purposes 
   (these messages will be removed or commented out later)


Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp	(original)
+++ vic/branches/cc/rtp/session.cpp	Wed Nov 12 19:29:54 2008
@@ -1156,6 +1156,7 @@
 void SessionManager::parse_xr_records(u_int32_t ssrc, rtcp_xr* xr, int cnt,
 				      const u_char* ep, Address & addr)
 {
+	printf("\tentering parse_xr_records()\n");
 	UNUSED(ssrc);
 	UNUSED(cnt);
 	UNUSED(ep);
@@ -1211,7 +1212,7 @@
 
 void SessionManager::cc_output() 
 {
-	//printf("\tentering cc_output()\n");
+	printf("\tentering cc_output()\n");
 	pktbuf* pb = head_;	// head of the packet queue
 	rtphdr* rh;		// declare rtp header
 
@@ -1221,34 +1222,34 @@
 
 	// cwnd value
 	int magic = (int) tfwc_magic();
-	//debug_msg("cwnd: %d\n", magic);
+	debug_msg("cwnd: %d\n", magic);
 	// last acked seqno
 	int jack = (int) tfwc_sndr_just_acked();
-	//debug_msg("jack: %d\n", jack);
+	debug_msg("jack: %d\n", jack);
 
 	// while packet seqno is within "cwnd + jack", send that packet
 	while (ntohs(rh->rh_seqno) <= magic + jack) {
-		if (pb != 0) {
-			//debug_msg("seqno: %d\n", ntohs(rh->rh_seqno));
-			// record seqno and timestamp at TfwcSndr side
-			tfwc_sndr_send(pb);
-
-			// call Transmitter::output(pb)
-			output(pb);
-
-			// trim packet buffer
-			pktbuf* nx = pb->next;
-			pb = nx;
-
-			// if pb is not 0, then parse rtp header
-			if (pb != 0)
-				rh = (rtphdr *) pb->data;
-			else 
-				break;
-
-			// move head pointer
-			head_ = pb;
-		}
+		debug_msg("seqno: %d\n", ntohs(rh->rh_seqno));
+		// record seqno and timestamp at TfwcSndr side
+		tfwc_sndr_send(pb);
+
+		// declare the next packet
+		pktbuf* nx = pb->next;
+
+		// call Transmitter::output(pb)
+		output(pb);
+
+		// move packet pointer
+		pb = nx;
+
+		// move head pointer
+		head_ = pb;
+
+		// if pb is not 0, then parse rtp header
+		if (pb != 0)
+			rh = (rtphdr *) pb->data;
+		else 
+			break;
 	} // end while
 }
 
@@ -1278,6 +1279,7 @@
 
 void SessionManager::send_xreport_back(CtrlHandler* ch, int bt, int bye)
 {
+	printf("\tentering send_xreport_back()\n");
 	UNUSED(bye);
 
 	SourceManager& sm = SourceManager::instance();



More information about the Sumover-dev mailing list