[Tinyos-commits] CVS: tinyos-1.x/tos/lib/Deluge DelugeM.nc, 1.54,
1.55 DelugeMetadataM.nc, 1.27, 1.28
Jonathan Hui
jwhui at users.sourceforge.net
Wed Aug 17 18:55:34 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/Deluge
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28156
Modified Files:
DelugeM.nc DelugeMetadataM.nc
Log Message:
- Better way of checking for unsupported images.
Index: DelugeM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/Deluge/DelugeM.nc,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** DelugeM.nc 17 Aug 2005 23:36:34 -0000 1.54
--- DelugeM.nc 18 Aug 2005 01:55:31 -0000 1.55
***************
*** 268,273 ****
if ( rxAdvMsg->version != DELUGE_VERSION
! || !isNodeDescValid(&rxAdvMsg->nodeDesc)
! || imgNum >= DELUGE_NUM_IMAGES )
return pMsg;
--- 268,272 ----
if ( rxAdvMsg->version != DELUGE_VERSION
! || !isNodeDescValid(&rxAdvMsg->nodeDesc) )
return pMsg;
***************
*** 290,294 ****
if ( rxAdvMsg->nodeDesc.vNum != nodeDesc.vNum
! && rxAdvMsg->nodeDesc.vNum != DELUGE_INVALID_VNUM ) {
resetTimer( rxAdvMsg->nodeDesc.imgNum );
if ( ( rxAdvMsg->nodeDesc.vNum - nodeDesc.vNum) > 0 ) {
--- 289,294 ----
if ( rxAdvMsg->nodeDesc.vNum != nodeDesc.vNum
! && rxAdvMsg->nodeDesc.vNum != DELUGE_INVALID_VNUM
! && rxAdvMsg->nodeDesc.imgNum < DELUGE_NUM_IMAGES ) {
resetTimer( rxAdvMsg->nodeDesc.imgNum );
if ( ( rxAdvMsg->nodeDesc.vNum - nodeDesc.vNum) > 0 ) {
Index: DelugeMetadataM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/Deluge/DelugeMetadataM.nc,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** DelugeMetadataM.nc 22 Jul 2005 17:40:07 -0000 1.27
--- DelugeMetadataM.nc 18 Aug 2005 01:55:32 -0000 1.28
***************
*** 240,244 ****
command bool Metadata.isImgDescValid(DelugeImgDesc* tmpImgDesc) {
return ( tmpImgDesc->crc == call Crc.crc16(tmpImgDesc, 8)
! && tmpImgDesc->crc != 0 );
}
--- 240,245 ----
command bool Metadata.isImgDescValid(DelugeImgDesc* tmpImgDesc) {
return ( tmpImgDesc->crc == call Crc.crc16(tmpImgDesc, 8)
! && tmpImgDesc->crc != 0
! && tmpImgDesc->imgNum < DELUGE_NUM_IMAGES );
}
More information about the Tinyos-commits
mailing list