]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fix bug when syncing page containing read pointer
authoridgay <idgay>
Wed, 11 Jul 2007 17:26:04 +0000 (17:26 +0000)
committeridgay <idgay>
Wed, 11 Jul 2007 17:26:04 +0000 (17:26 +0000)
tos/chips/at45db/LogStorageP.nc

index 4349e1eb870a5e1a900d394346be7cde2ba8f358..0f25515822d81c4d82c98281d948f04b589b22e3 100644 (file)
@@ -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();
   }