From dc97a29131477123ed9c2da991544b5d8d8adbd2 Mon Sep 17 00:00:00 2001 From: idgay Date: Wed, 11 Jul 2007 17:26:04 +0000 Subject: [PATCH] fix bug when syncing page containing read pointer --- tos/chips/at45db/LogStorageP.nc | 3 +++ 1 file changed, 3 insertions(+) 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(); } -- 2.39.2