From: scipio Date: Wed, 10 Feb 2010 19:13:06 +0000 (+0000) Subject: Shouldn't fail when you reach the end of the log. Sync instead. X-Git-Tag: rc_6_tinyos_2_1_1~21 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=108491d3f8ff0981434b4ae98a5f89f6b320a662;hp=d5016f4dac85a26df066061143428839649f4f93 Shouldn't fail when you reach the end of the log. Sync instead. --- 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); + } } }