]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/eyesIFX/RadioCountToFlash/RadioCountToFlashC.nc
The big interface switchover for Packet, Send, Receive, and AMSend.
[tinyos-2.x.git] / apps / tests / eyesIFX / RadioCountToFlash / RadioCountToFlashC.nc
index 0ec35e6769e8f5c59ad39fc3e5855a2423e08c52..bbbabc77da61fff912b33887826d3df10fc6fcbb 100644 (file)
@@ -115,8 +115,8 @@ implementation {
       return;
     }
     else {
-      RadioCountMsg* rcm = (RadioCountMsg*)call Packet.getPayload(&packet, NULL);
-      if (call Packet.maxPayloadLength() < sizeof(RadioCountMsg)) {
+      RadioCountMsg* rcm = (RadioCountMsg*)call Packet.getPayload(&packet, sizeof(rcm));
+      if (rcm == NULL || call Packet.maxPayloadLength() < sizeof(RadioCountMsg)) {
         return;
       }
       ++sendingCounter;