]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Fix clear() bug: should only clear header, footer, and metadata, not payload.
authorscipio <scipio>
Thu, 25 Jun 2009 18:41:37 +0000 (18:41 +0000)
committerscipio <scipio>
Thu, 25 Jun 2009 18:41:37 +0000 (18:41 +0000)
tos/chips/cc1000/CC1000SendReceiveP.nc

index 61186cb644dd6cf70e7a339e8cbee65cffe18629..09a395501aa0d40869a485035d044ac9665e6d83 100644 (file)
@@ -664,7 +664,9 @@ implementation
   /* Abstract packet layout */
 
   command void Packet.clear(message_t *msg) {
-    memset(msg, 0, sizeof(message_t));
+    memset(getHeader(msg), 0x0, sizeof(cc1000_header_t));
+    memset(getFooter(msg), 0x0, sizeof(cc1000_footer_t));
+    memset(getMetadata(msg), 0x0, sizeof(cc1000_metadata_t));
   }
 
   command uint8_t Packet.payloadLength(message_t *msg) {