]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf2xx/layers/ActiveMessageLayerP.nc
automaticaly call Packet.clear if user forgot to do so
[tinyos-2.x.git] / tos / chips / rf2xx / layers / ActiveMessageLayerP.nc
index a652486ebc7a1feb553d084b0b1744df5bd3d45f..1f75d36b6337ce76a31fa41a075844b241de7ef0 100644 (file)
@@ -65,6 +65,9 @@ implementation
                if( len > call Packet.maxPayloadLength() )
                        return EINVAL;
 
+               if( call Config.checkFrame(msg) != SUCCESS )
+                       return FAIL;
+
                call Packet.setPayloadLength(msg, len);
                call AMPacket.setSource(msg, call AMPacket.address());
                call AMPacket.setGroup(msg, call AMPacket.localGroup());