mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-09 23:54:32 +00:00
only update rimestats rexmit for retransmissions + added debug output when retransmitting
This commit is contained in:
parent
7512df3f7b
commit
9a11bc1543
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: ruc.c,v 1.12 2007/05/22 21:53:15 adamdunkels Exp $
|
* $Id: ruc.c,v 1.13 2007/10/23 14:00:36 nifi Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,7 +67,12 @@ sent_by_suc(struct suc_conn *suc)
|
|||||||
{
|
{
|
||||||
struct ruc_conn *c = (struct ruc_conn *)suc;
|
struct ruc_conn *c = (struct ruc_conn *)suc;
|
||||||
|
|
||||||
RIMESTATS_ADD(rexmit);
|
if(c->rxmit) {
|
||||||
|
RIMESTATS_ADD(rexmit);
|
||||||
|
PRINTF("%d.%d: ruc: packet %u resent %u\n",
|
||||||
|
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
|
||||||
|
((struct ruc_hdr *) rimebuf_dataptr())->seqno, c->rxmit);
|
||||||
|
}
|
||||||
|
|
||||||
c->rxmit++;
|
c->rxmit++;
|
||||||
if(c->rxmit >= c->max_rxmit) {
|
if(c->rxmit >= c->max_rxmit) {
|
||||||
@ -180,7 +185,7 @@ ruc_send(struct ruc_conn *c, rimeaddr_t *receiver, u8_t max_retransmissions)
|
|||||||
c->max_rxmit = max_retransmissions;
|
c->max_rxmit = max_retransmissions;
|
||||||
c->rxmit = 0;
|
c->rxmit = 0;
|
||||||
RIMESTATS_ADD(reliabletx);
|
RIMESTATS_ADD(reliabletx);
|
||||||
PRINTF("%d.%d: ruc: sendign packet %d\n",
|
PRINTF("%d.%d: ruc: sending packet %d\n",
|
||||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||||
c->sndnxt);
|
c->sndnxt);
|
||||||
return suc_send_stubborn(&c->c, receiver, REXMIT_TIME);
|
return suc_send_stubborn(&c->c, receiver, REXMIT_TIME);
|
||||||
|
Loading…
Reference in New Issue
Block a user