From 3c0edd88ca1663f859090a7c33e720628bef5d61 Mon Sep 17 00:00:00 2001 From: rincon Date: Wed, 9 Jan 2008 19:44:37 +0000 Subject: [PATCH] Added a secondary CRC check at the top of the stack while investigating the check at the bottom. --- tos/chips/cc2420/CC2420ActiveMessageP.nc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tos/chips/cc2420/CC2420ActiveMessageP.nc b/tos/chips/cc2420/CC2420ActiveMessageP.nc index 2cd35c88..a4e4f843 100644 --- a/tos/chips/cc2420/CC2420ActiveMessageP.nc +++ b/tos/chips/cc2420/CC2420ActiveMessageP.nc @@ -164,6 +164,11 @@ implementation { /***************** SubReceive Events ****************/ event message_t* SubReceive.receive(message_t* msg, void* payload, uint8_t len) { + + if(!(call CC2420PacketBody.getMetadata(msg))->crc) { + return msg; + } + if (call AMPacket.isForMe(msg)) { return signal Receive.receive[call AMPacket.type(msg)](msg, payload, len - CC2420_SIZE); } -- 2.39.2