From: idgay Date: Wed, 11 Jul 2007 17:26:04 +0000 (+0000) Subject: fix bug when syncing page containing read pointer X-Git-Tag: release_tools_1_2_4_1~39 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=dc97a29131477123ed9c2da991544b5d8d8adbd2 fix bug when syncing page containing read pointer --- diff --git a/tos/chips/at45db/LogStorageP.nc b/tos/chips/at45db/LogStorageP.nc index 4349e1eb..0f255158 100644 --- a/tos/chips/at45db/LogStorageP.nc +++ b/tos/chips/at45db/LogStorageP.nc @@ -267,6 +267,9 @@ implementation void sync() { metadata.flags = F_SYNC | F_LASTVALID; metadata.lastRecordOffset = s[client].woffset; + /* rend is now no longer the end of the page */ + if (s[client].rpage == s[client].wpage) + s[client].rend = s[client].woffset; wmetadataStart(); }