only update rimestats rexmit for retransmissions + added debug output when retransmitting
This commit is contained in:
parent
7512df3f7b
commit
9a11bc1543
1 changed files with 9 additions and 4 deletions
|
@ -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;
|
||||||
|
|
||||||
|
if(c->rxmit) {
|
||||||
RIMESTATS_ADD(rexmit);
|
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 a new issue