[Sumover-dev] [svn commit] r4322 - vic/branches/cc/cc
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Mon Nov 17 18:36:56 GMT 2008
Author: soohyunc
Date: Mon Nov 17 18:36:56 2008
New Revision: 4322
Modified:
vic/branches/cc/cc/tfwc_rcvr.cpp
Log:
o bug fix
- there was a bug when calculating the number of lost packets.
- after shifting bits to 0 as equal to the number of lost packets, it must set
1 at the end of bit shifting because a packet has just been received
successfully.
for example, if the received ackvec is (4 1) - e.g., two packet loss (#2
and #3), then the ackvec bit shifting should work like,
1) find out two packet loss
2) 0 bit shifting twice because two packet loss
3) and perform 1 bit shifting (this is corresponding packet seqno #4)
Modified: vic/branches/cc/cc/tfwc_rcvr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_rcvr.cpp (original)
+++ vic/branches/cc/cc/tfwc_rcvr.cpp Mon Nov 17 18:36:56 2008
@@ -71,10 +71,13 @@
// number of packet loss
int cnt = currseq_ - prevseq_ - 1;
- // set next bit to 0
+ // set next bit to 0 equal to the number of lost packets
for (int i = 0; i < cnt; i++) {
SET_BIT_VEC(tfwcAV, 0);
}
+
+ // then, set this packet as received (this is important)
+ SET_BIT_VEC(tfwcAV, 1);
}
// trim ackvec
More information about the Sumover-dev
mailing list