fixed excessive retransmissions of junk packets after runicast timeout
fixed stuck packet ID for next packet after runicast timeout
This commit is contained in:
parent
6e20a4c0ce
commit
cae8ef206a
@ -101,11 +101,12 @@ sent_by_stunicast(struct stunicast_conn *stunicast, int status, int num_tx)
|
||||
PRINTF("%d.%d: runicast: packet %d timed out\n",
|
||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||
c->sndnxt);
|
||||
c->sndnxt = (c->sndnxt + 1) % (1 << RUNICAST_PACKET_ID_BITS);
|
||||
} else {
|
||||
int shift;
|
||||
// int shift;
|
||||
|
||||
shift = c->rxmit > 4? 4: c->rxmit;
|
||||
stunicast_set_timer(&c->c, (REXMIT_TIME) << shift);
|
||||
// shift = c->rxmit > 4? 4: c->rxmit;
|
||||
// stunicast_set_timer(&c->c, (REXMIT_TIME) << shift);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,9 +113,11 @@ send(void *ptr)
|
||||
PRINTF("%d.%d: stunicast: resend to %d.%d\n",
|
||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||
c->receiver.u8[0], c->receiver.u8[1]);
|
||||
queuebuf_to_packetbuf(c->buf);
|
||||
unicast_send(&c->c, &c->receiver);
|
||||
stunicast_set_timer(c, CLOCK_SECOND);
|
||||
if(c->buf) {
|
||||
queuebuf_to_packetbuf(c->buf);
|
||||
unicast_send(&c->c, &c->receiver);
|
||||
stunicast_set_timer(c, CLOCK_SECOND);
|
||||
}
|
||||
/* if(c->u->sent != NULL) {
|
||||
c->u->sent(c);
|
||||
}*/
|
||||
|
Loading…
Reference in New Issue
Block a user