Bugfix: clear the header after sending a packet solves a problem with fragmentation; also prod the watchdog since fragment transmissions can take a long time with some low-power MAC protocol

This commit is contained in:
adamdunkels 2010-02-06 07:49:58 +00:00
parent a68b4c40c4
commit 494e692d0b

View File

@ -32,7 +32,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: sicslowpan.c,v 1.12 2010/02/03 16:44:19 adamdunkels Exp $
* $Id: sicslowpan.c,v 1.13 2010/02/06 07:49:58 adamdunkels Exp $
*/
/**
* \file
@ -1114,6 +1114,14 @@ send_packet(rimeaddr_t *dest)
* be to figure out how to get rid of delays entirely */
sicslowpan_mac->send();
}
/* If we are sending multiple packets in a row, we need to let the
watchdog know that we are still alive. */
watchdog_periodic();
/* The MAC may add headers. We clear them here, since we may need to
resend (parts of) the packet during fragmentation. */
packetbuf_clear_hdr();
}
/** \brief Take an IP packet and format it to be sent on an 802.15.4