From: idgay Date: Mon, 23 Jun 2008 20:02:19 +0000 (+0000) Subject: compile fixes X-Git-Tag: release_tinyos_2_1_0_0~204 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=4f153601d1707478e04f77199ff0c6d687933b9c compile fixes --- diff --git a/apps/tests/storage/Log/RandRWC.nc b/apps/tests/storage/Log/RandRWC.nc index 7e5ae49a..0420ac2e 100644 --- a/apps/tests/storage/Log/RandRWC.nc +++ b/apps/tests/storage/Log/RandRWC.nc @@ -65,11 +65,15 @@ implementation { message_t reportmsg; void report(error_t e) { - uint8_t *msg = call AMSend.getPayload(&reportmsg); + uint8_t *msg = call AMSend.getPayload(&reportmsg, 1); - msg[0] = e; - if (call AMSend.send(AM_BROADCAST_ADDR, &reportmsg, 1) != SUCCESS) - call Leds.led0On(); + if (msg) + { + msg[0] = e; + if (call AMSend.send(AM_BROADCAST_ADDR, &reportmsg, 1) == SUCCESS) + return; + } + call Leds.led0On(); } event void AMSend.sendDone(message_t* msg, error_t error) {