[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection
ForwardingEngineP.nc, 1.1.2.47, 1.1.2.48
Phil Levis
scipio at users.sourceforge.net
Wed Aug 2 14:13:31 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/usart
HplMsp430I2CInterrupts.nc, NONE, 1.1.2.1 Msp430I2C0P.nc, NONE,
1.1.2.1 Msp430I2CC.nc, NONE, 1.1.2.1 Msp430I2CP.nc, NONE,
1.1.2.1 HplMsp430Usart0C.nc, 1.1.2.7,
1.1.2.8 HplMsp430Usart0P.nc, 1.1.2.7,
1.1.2.8 HplMsp430UsartInterrupts.nc, 1.1.2.1,
1.1.2.2 Msp430Usart0C.nc, 1.1.2.4,
1.1.2.5 Msp430UsartShare0P.nc, 1.1.2.4,
1.1.2.5 Msp430UsartShareP.nc, 1.1.2.3, 1.1.2.4
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/platforms/eyesIFX/chips/msp430 - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv451
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
ForwardingEngineP.nc
Log Message:
Bug fix from Jan Hauer pertaining to checking for duplicates in the queue.
If the queue size is 0, --i will decrement it to 255 and the loop will
run 255 times. Futhermore, as the queue does not have that many elements,
it will return NULL which can cause problems.
Index: ForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection/ForwardingEngineP.nc,v
retrieving revision 1.1.2.47
retrieving revision 1.1.2.48
diff -C2 -d -r1.1.2.47 -r1.1.2.48
*** ForwardingEngineP.nc 28 Jun 2006 23:46:38 -0000 1.1.2.47
--- ForwardingEngineP.nc 2 Aug 2006 21:13:29 -0000 1.1.2.48
***************
*** 697,709 ****
}
//... and in the queue for duplicates
! atomic {
! for (i = call SendQueue.size(); --i ;) {
! qe = call SendQueue.element(i);
! if (call CollectionPacket.getPacketID(qe->msg) == msg_uid) {
! duplicate = TRUE;
! break;
! }
! }
}
if (duplicate) {
call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_QUEUE);
--- 697,710 ----
}
//... and in the queue for duplicates
! if (call SendQueue.size() > 0) {
! for (i = call SendQueue.size(); --i;) {
! qe = call SendQueue.element(i);
! if (call CollectionPacket.getPacketID(qe->msg) == msg_uid) {
! duplicate = TRUE;
! break;
! }
! }
}
+
if (duplicate) {
call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_QUEUE);
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/usart
HplMsp430I2CInterrupts.nc, NONE, 1.1.2.1 Msp430I2C0P.nc, NONE,
1.1.2.1 Msp430I2CC.nc, NONE, 1.1.2.1 Msp430I2CP.nc, NONE,
1.1.2.1 HplMsp430Usart0C.nc, 1.1.2.7,
1.1.2.8 HplMsp430Usart0P.nc, 1.1.2.7,
1.1.2.8 HplMsp430UsartInterrupts.nc, 1.1.2.1,
1.1.2.2 Msp430Usart0C.nc, 1.1.2.4,
1.1.2.5 Msp430UsartShare0P.nc, 1.1.2.4,
1.1.2.5 Msp430UsartShareP.nc, 1.1.2.3, 1.1.2.4
- Next message: [Tinyos-2-commits]
CVS: tinyos-2.x/tos/platforms/eyesIFX/chips/msp430 - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list