mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
clear transmission flag if send failed
This commit is contained in:
parent
23d5f84a46
commit
7b2b93e6e6
@ -34,7 +34,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: runicast.c,v 1.7 2009/11/08 19:40:18 adamdunkels Exp $
|
||||
* $Id: runicast.c,v 1.8 2009/12/18 14:49:42 nifi Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -213,7 +213,8 @@ int
|
||||
runicast_send(struct runicast_conn *c, const rimeaddr_t *receiver,
|
||||
uint8_t max_retransmissions)
|
||||
{
|
||||
if (runicast_is_transmitting(c)) {
|
||||
int ret;
|
||||
if(runicast_is_transmitting(c)) {
|
||||
PRINTF("%d.%d: runicast: already transmitting\n",
|
||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1]);
|
||||
return 0;
|
||||
@ -228,7 +229,11 @@ runicast_send(struct runicast_conn *c, const rimeaddr_t *receiver,
|
||||
PRINTF("%d.%d: runicast: sending packet %d\n",
|
||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||
c->sndnxt);
|
||||
return stunicast_send_stubborn(&c->c, receiver, REXMIT_TIME);
|
||||
ret = stunicast_send_stubborn(&c->c, receiver, REXMIT_TIME);
|
||||
if(!ret) {
|
||||
c->is_tx = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user