[Sumover-dev] [svn commit] r4318 - vic/branches/cc/cc

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Fri Nov 14 15:38:35 GMT 2008


Author: soohyunc
Date: Fri Nov 14 15:38:32 2008
New Revision: 4318

Modified:
   vic/branches/cc/cc/tfwc_sndr.cpp

Log:
('cwnd_' value should be always greater than 1.)
o  previously, 'cwnd_' could go into 0 value, which can cause to stop sending
   packets. so, when 'cwnd_' goes below 1, it should always round up to 1.


Modified: vic/branches/cc/cc/tfwc_sndr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.cpp	(original)
+++ vic/branches/cc/cc/tfwc_sndr.cpp	Fri Nov 14 15:38:32 2008
@@ -276,6 +276,10 @@
 	t_win_ = 1 / f_p_;
 
 	cwnd_ = (int) (t_win_ + .5);
+
+	// cwnd should always be greater than 1
+	if (cwnd_ < 1)
+		cwnd_ = 1;
 }
 
 /*



More information about the Sumover-dev mailing list