X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fat45db%2FLogStorageP.nc;h=0f25515822d81c4d82c98281d948f04b589b22e3;hb=dc97a29131477123ed9c2da991544b5d8d8adbd2;hp=4349e1eb870a5e1a900d394346be7cde2ba8f358;hpb=e3e9ee1a55db4ae12635fc7594e3e68087e750ce;p=tinyos-2.x.git 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(); }