]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/transmit/CC2420TransmitP.nc
m_msg can be null (before first send)
[tinyos-2.x.git] / tos / chips / cc2420 / transmit / CC2420TransmitP.nc
index 17653d6584c4b471d366a52e2c06ef6b999dbf48..7c07cab74feea0c163e7f58b6aad82e0c9787f1d 100644 (file)
@@ -327,7 +327,8 @@ implementation {
         m_receiving = FALSE;
         if ( time - m_prev_time < 10 ) {
           call CC2420Receive.sfd_dropped();
-          call PacketTimeStamp.clear(m_msg);
+         if (m_msg)
+           call PacketTimeStamp.clear(m_msg);
         }
         break;
       
@@ -355,7 +356,7 @@ implementation {
     uint8_t* ack_buf;
     uint8_t length;
 
-    if ( type == IEEE154_TYPE_ACK ) {
+    if ( type == IEEE154_TYPE_ACK && m_msg) {
       ack_header = call CC2420PacketBody.getHeader( ack_msg );
       msg_header = call CC2420PacketBody.getHeader( m_msg );