[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/Deluge
DelugeManagerP.nc, 1.2, 1.3
Razvan Musaloiu-E.
razvanm at users.sourceforge.net
Tue Jan 15 12:33:48 PST 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/Deluge
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv2596/tos/lib/net/Deluge
Modified Files:
DelugeManagerP.nc
Log Message:
Add a translation between imgNum to volumeId. This should allow non-Deluge images to peacefully coexist with Deluge.
Index: DelugeManagerP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/Deluge/DelugeManagerP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DelugeManagerP.nc 15 Jan 2008 19:14:50 -0000 1.2
--- DelugeManagerP.nc 15 Jan 2008 20:33:46 -0000 1.3
***************
*** 56,59 ****
--- 56,65 ----
message_t serialMsg;
DelugeCmd delugeCmd;
+ uint8_t imgNum2volumeId[] = {
+ VOLUME_GOLDENIMAGE,
+ VOLUME_DELUGE1,
+ VOLUME_DELUGE2,
+ VOLUME_DELUGE3
+ };
void sendReply(error_t error)
***************
*** 86,90 ****
case DELUGE_CMD_DISSEMINATE_AND_REPROGRAM:
if (call Resource.immediateRequest() == SUCCESS) {
! call DelugeMetadata.read(request->imgNum);
} else {
sendReply(FAIL);
--- 92,96 ----
case DELUGE_CMD_DISSEMINATE_AND_REPROGRAM:
if (call Resource.immediateRequest() == SUCCESS) {
! call DelugeMetadata.read(imgNum2volumeId[request->imgNum]);
} else {
sendReply(FAIL);
***************
*** 93,97 ****
case DELUGE_CMD_REPROGRAM:
case DELUGE_CMD_REBOOT:
! delugeCmd.imgNum = request->imgNum;
call DelayTimer.startOneShot(1024);
sendReply(SUCCESS);
--- 99,103 ----
case DELUGE_CMD_REPROGRAM:
case DELUGE_CMD_REBOOT:
! delugeCmd.imgNum = imgNum2volumeId[request->imgNum];
call DelayTimer.startOneShot(1024);
sendReply(SUCCESS);
More information about the Tinyos-2-commits
mailing list