From 2d484e1eadf3fe7c5feba43800745eca3b20ad75 Mon Sep 17 00:00:00 2001 From: Till Harbaum Date: Tue, 4 Oct 2011 20:50:14 -0500 Subject: [PATCH] Fix missing UDP stats for sent/received packets i just saw that the stats taking in uip is missing entries for udp receive and transmit. To fix this insert a UIP_STAT after the udp_found label: udp_found: + UIP_STAT(++uip_stat.udp.recv); And a UIP_STAT before the goto ip_send_nolen instruction: + UIP_STAT(++uip_stat.udp.sent); goto ip_send_nolen; --- src/uip/uip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uip/uip.c b/src/uip/uip.c index cae1a1dd..9880d836 100644 --- a/src/uip/uip.c +++ b/src/uip/uip.c @@ -1196,6 +1196,7 @@ uip_process(u8_t flag) goto drop; udp_found: + UIP_STAT(++uip_stat.udp.recv); #if UIP_TCP uip_conn = NULL; #endif /* UIP_TCP */ @@ -1241,6 +1242,7 @@ uip_process(u8_t flag) } #endif /* UIP_UDP_CHECKSUMS */ + UIP_STAT(++uip_stat.udp.sent); goto ip_send_nolen; #endif /* UIP_UDP */