]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/CC2420ActiveMessageP.nc
Added a secondary CRC check at the top of the stack while investigating the check...
[tinyos-2.x.git] / tos / chips / cc2420 / CC2420ActiveMessageP.nc
index 2cd35c88ef38e5f1e77f21d5f826b26bca7ce746..a4e4f843f3bde76c1d4eed5b774a74fc8ca26d3b 100644 (file)
@@ -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);
     }