diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-26 09:32:39 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-26 09:32:39 -0600 |
commit | 75f58f656bd9f3530a4463649e68fc865d53baab (patch) | |
tree | 2ac12b0b6f149bc7bbccc5183bc591f7bd17afd1 /apps/examples | |
parent | 1206502f67badb5938a0012c18e21a9fa45c6f5b (diff) | |
download | px4-nuttx-75f58f656bd9f3530a4463649e68fc865d53baab.tar.gz px4-nuttx-75f58f656bd9f3530a4463649e68fc865d53baab.tar.bz2 px4-nuttx-75f58f656bd9f3530a4463649e68fc865d53baab.zip |
NET: Move statistcs from uip.h to new netstats.h to remove nasty circular inclusion problem.
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/uip/cgi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/examples/uip/cgi.c b/apps/examples/uip/cgi.c index 8d081db92..af579fb48 100644 --- a/apps/examples/uip/cgi.c +++ b/apps/examples/uip/cgi.c @@ -40,6 +40,7 @@ #include <string.h> #include <sys/socket.h> +#include <nuttx/net/netstats.h> #include <apps/netutils/httpd.h> #include "cgi.h" @@ -70,9 +71,9 @@ static void net_stats(struct httpd_state *pstate, char *ptr) char buffer[16]; int i; - for (i = 0; i < sizeof(uip_stat) / sizeof(uip_stats_t); i++) + for (i = 0; i < sizeof(g_netstats) / sizeof(net_stats_t); i++) { - snprintf(buffer, 16, "%5u\n", ((uip_stats_t *)&uip_stat)[i]); + snprintf(buffer, 16, "%5u\n", ((net_stats_t *)&g_netstats)[i]); send(pstate->ht_sockfd, buffer, strlen(buffer), 0); } } |