From 715bc8148c53c795b59f1bd11793b9781a994810 Mon Sep 17 00:00:00 2001 From: "Ruslan V. Uss" Date: Wed, 11 Oct 2017 03:21:47 +0500 Subject: [PATCH] Fix example broken by DHCP update (#461) --- examples/tcp_non_blocking/tcp_non_blocking.c | 2 +- extras/wificfg/wificfg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tcp_non_blocking/tcp_non_blocking.c b/examples/tcp_non_blocking/tcp_non_blocking.c index 4e35aa2..6fe4e99 100644 --- a/examples/tcp_non_blocking/tcp_non_blocking.c +++ b/examples/tcp_non_blocking/tcp_non_blocking.c @@ -193,7 +193,7 @@ void user_init(void) ip_addr_t first_client_ip; IP4_ADDR(&first_client_ip, 172, 16, 0, 2); - dhcpserver_start(&first_client_ip, 4); + dhcpserver_start(sdk_system_get_netif(SOFTAP_IF), &first_client_ip, 4); printf("DHCP started\n"); //Create a queue to store events on netconns diff --git a/extras/wificfg/wificfg.c b/extras/wificfg/wificfg.c index 708af29..605e31f 100644 --- a/extras/wificfg/wificfg.c +++ b/extras/wificfg/wificfg.c @@ -1995,7 +1995,7 @@ void wificfg_init(uint32_t port, const wificfg_dispatch *dispatch) if (wifi_ap_dns < 0 || wifi_ap_dns > 1) wifi_ap_dns = 1; - dhcpserver_start(&first_client_ip, wifi_ap_dhcp_leases); + dhcpserver_start(sdk_system_get_netif(SOFTAP_IF), &first_client_ip, wifi_ap_dhcp_leases); dhcpserver_set_router(&ap_ip.ip); if (wifi_ap_dns) { dhcpserver_set_dns(&ap_ip.ip);