From: idgay Date: Fri, 20 Apr 2007 17:39:37 +0000 (+0000) Subject: handle full log X-Git-Tag: tinyos/2.0.1~14 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=abfb7ab5e9a2190644be34463d37734fa1e9c5d5 handle full log --- diff --git a/apps/tests/storage/Log/RandRWC.nc b/apps/tests/storage/Log/RandRWC.nc index ab762de7..7e5ae49a 100644 --- a/apps/tests/storage/Log/RandRWC.nc +++ b/apps/tests/storage/Log/RandRWC.nc @@ -99,6 +99,8 @@ implementation { return b; } + volatile int x; + void setParameters() { len = rand() >> 8; offset = rand() >> 9; @@ -138,7 +140,9 @@ implementation { } event void LogWrite.appendDone(void *buf, storage_len_t y, bool recordsLost, error_t result) { - if (scheck(result)) + if (result == ESIZE) + scheck(call LogWrite.sync()); + else if (scheck(result)) nextWrite(); }