]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Implement clear() properly.
authorscipio <scipio>
Tue, 19 Feb 2008 21:32:37 +0000 (21:32 +0000)
committerscipio <scipio>
Tue, 19 Feb 2008 21:32:37 +0000 (21:32 +0000)
tos/chips/cc2420/CC2420ActiveMessageP.nc

index b5bc03a7226e0f7c7f0ef1305f1427c4af8dfcc6..7a111f53603fe9e54d70a37c8750f82ad030d8db 100644 (file)
@@ -141,6 +141,8 @@ implementation {
 
   /***************** Packet Commands ****************/
   command void Packet.clear(message_t* msg) {
+    memset(call CC2420PacketBody.getHeader(msg), sizeof(cc2420_header_t), 0);
+    memset(call CC2420PacketBody.getMetadata(msg), sizeof(cc2420_metadata_t), 0);
   }
   
   command uint8_t Packet.payloadLength(message_t* msg) {