1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00

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;
This commit is contained in:
Till Harbaum 2011-10-04 20:50:14 -05:00 committed by James Snyder
parent fa335c481e
commit 2d484e1ead

View File

@ -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 */