Bugfix: don't set the 'we are sending' flag until we are actually sending
This commit is contained in:
parent
6897270289
commit
8bcc838d8a
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: xmac.c,v 1.44 2009/12/06 13:16:59 adamdunkels Exp $
|
||||
* $Id: xmac.c,v 1.45 2009/12/06 17:05:45 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -511,10 +511,6 @@ send_packet(void)
|
||||
return MAC_TX_ERR;
|
||||
}
|
||||
|
||||
/* By setting we_are_sending to one, we ensure that the rtimer
|
||||
powercycle interrupt do not interfere with us sending the packet. */
|
||||
we_are_sending = 1;
|
||||
|
||||
#if WITH_STREAMING
|
||||
if(is_streaming == 1 &&
|
||||
(rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER),
|
||||
@ -576,6 +572,10 @@ send_packet(void)
|
||||
}
|
||||
#endif /* WITH_ENCOUNTER_OPTIMIZATION */
|
||||
|
||||
/* By setting we_are_sending to one, we ensure that the rtimer
|
||||
powercycle interrupt do not interfere with us sending the packet. */
|
||||
we_are_sending = 1;
|
||||
|
||||
t0 = RTIMER_NOW();
|
||||
strobes = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user