X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Flib%2Fnet%2FDeluge%2FDelugeMetadataP.nc;h=948a470433ccd8f26835de18f92431a3430397ce;hp=f10b3144b1c0481de8c390bbde06a3d0f1f4b159;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/lib/net/Deluge/DelugeMetadataP.nc b/tos/lib/net/Deluge/DelugeMetadataP.nc index f10b3144..948a4704 100644 --- a/tos/lib/net/Deluge/DelugeMetadataP.nc +++ b/tos/lib/net/Deluge/DelugeMetadataP.nc @@ -71,7 +71,7 @@ implementation { return DELUGE_IDENT_SIZE + currentPage * sizeof(uint16_t); } - + uint32_t calcPageAddr() { return DELUGE_IDENT_SIZE + DELUGE_CRC_BLOCK_SIZE + currentPage * DELUGE_BYTES_PER_PAGE; @@ -87,7 +87,7 @@ implementation state = S_READ_IDENT; currentImageIdx = 0; currentVolume = _imgNum2volumeId[currentImageIdx]; - nextImage(); + nextImage(); } command error_t DelugeMetadata.read[uint8_t client](uint8_t imgNum) @@ -117,6 +117,7 @@ implementation call BlockRead.read[currentVolume](calcCrcAddr(), ¤tCrc, sizeof(currentCrc)); } else { currentImageIdx++; + currentVolume = _imgNum2volumeId[currentImageIdx]; nextImage(); } } @@ -143,7 +144,7 @@ implementation call BlockRead.read[currentVolume](calcCrcAddr(), ¤tCrc, sizeof(currentCrc)); } else { currentImageIdx++; - currentVolume = _imgNum2volumeId[currentImageIdx]; + currentVolume = _imgNum2volumeId[currentImageIdx]; nextImage(); } }