From 4f153601d1707478e04f77199ff0c6d687933b9c Mon Sep 17 00:00:00 2001 From: idgay Date: Mon, 23 Jun 2008 20:02:19 +0000 Subject: [PATCH] compile fixes --- apps/tests/storage/Log/RandRWC.nc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) { -- 2.39.2