Browse Source

Fix compiling lwiperf_example.c with TCP disabled

master
Simon Goldschmidt 8 years ago
parent
commit
35b011d4cf
  1. 4
      examples/lwiperf/lwiperf_example.c

4
examples/lwiperf/lwiperf_example.c

@ -30,6 +30,7 @@
#include "lwip/apps/lwiperf.h"
#include "lwiperf_example.h"
#if LWIP_TCP
static void
lwiperf_report(void *arg, enum lwiperf_report_type report_type,
const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port,
@ -42,9 +43,12 @@ lwiperf_report(void *arg, enum lwiperf_report_type report_type,
printf("IPERF report: type=%d, remote: %s:%d, total bytes: %"U32_F", duration in ms: %"U32_F", kbits/s: %"U32_F"\n",
(int)report_type, ipaddr_ntoa(remote_addr), (int)remote_port, bytes_transferred, ms_duration, bandwidth_kbitpsec);
}
#endif /* LWIP_TCP */
void
lwiperf_example_init(void)
{
#if LWIP_TCP
lwiperf_start_tcp_server_default(lwiperf_report, NULL);
#endif
}

Loading…
Cancel
Save