X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2Ftests%2Fstorage%2FLog%2FRandRWC.nc;h=7a79e132a96bf34803c8129c402826a85e630814;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=0c7ee628a86165df2ccb0c2f7a4ace69e4403d49;hpb=b2f6921eb24d60d291c0dd7a7ee17ce1c6f2c0fa;p=tinyos-2.x.git diff --git a/apps/tests/storage/Log/RandRWC.nc b/apps/tests/storage/Log/RandRWC.nc index 0c7ee628..7a79e132 100644 --- a/apps/tests/storage/Log/RandRWC.nc +++ b/apps/tests/storage/Log/RandRWC.nc @@ -138,8 +138,16 @@ implementation { scheck(call LogWrite.sync()); else { + error_t result; setParameters(); - scheck(call LogWrite.append(data + offset, len)); + result = call LogWrite.append(data + offset, len); + if (result == ESIZE) { + // We have reached the end of the log, sync it + scheck(call LogWrite.sync()); + } + else { + scheck(result); + } } }