[Sumover-dev] [svn commit] r4327 - in vic/branches/cc: rtp

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Tue Nov 18 18:10:08 GMT 2008


Author: soohyunc
Date: Tue Nov 18 18:10:08 2008
New Revision: 4327

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

Log:
o  the variables should be initialized in the first place, otherwise, it may have
   a wrong number in it.
o  'offset' value must not go below 0, but previously, we didn't have the scheme
   for checking the value.
   (this 'offset' value will be used to shift the bit map.)


Modified: vic/branches/cc/cc/tfwc_rcvr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_rcvr.cpp	(original)
+++ vic/branches/cc/cc/tfwc_rcvr.cpp	Tue Nov 18 18:10:08 2008
@@ -56,7 +56,9 @@
 				u_int16_t ackofack, u_int32_t ts) 
 {
 	// variables
-	int cnt, offset, num;
+	int cnt		= 0;
+	int offset	= 0;
+	int num		= 0;
 
 	// parse the received seqno and ackofack
 	if (type == XR_BT_1) {
@@ -84,10 +86,11 @@
 		}
 		
 		// number of elements in tfwcAV
-		num = currseq_ - ackofack_ -cnt;
+		num = currseq_ - ackofack_ - cnt;
 
 		// trim ackvec
-		offset = currseq_ - ackofack_;
+		offset = ((num - DUPACKS) < 0) ? 0 : (num - DUPACKS);
+
 		if (ackofack_)
 			trimvec(tfwcAV, offset);
 

Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp	(original)
+++ vic/branches/cc/rtp/session.cpp	Tue Nov 18 18:10:08 2008
@@ -1156,7 +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");
+	//printf("\tentering parse_xr_records()\n");
 	UNUSED(ssrc);
 	UNUSED(cnt);
 	UNUSED(ep);
@@ -1279,7 +1279,7 @@
 
 void SessionManager::send_xreport_back(CtrlHandler* ch, int bt, int bye)
 {
-	printf("\tentering send_xreport_back()\n");
+	//printf("\tentering send_xreport_back()\n");
 	UNUSED(bye);
 
 	SourceManager& sm = SourceManager::instance();



More information about the Sumover-dev mailing list