Fix example broken by DHCP update (#461)

This commit is contained in:
Ruslan V. Uss 2017-10-11 03:21:47 +05:00 committed by GitHub
parent cb4ea206fa
commit 715bc8148c
2 changed files with 2 additions and 2 deletions

View file

@ -193,7 +193,7 @@ void user_init(void)
ip_addr_t first_client_ip; ip_addr_t first_client_ip;
IP4_ADDR(&first_client_ip, 172, 16, 0, 2); 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"); printf("DHCP started\n");
//Create a queue to store events on netconns //Create a queue to store events on netconns

View file

@ -1995,7 +1995,7 @@ void wificfg_init(uint32_t port, const wificfg_dispatch *dispatch)
if (wifi_ap_dns < 0 || wifi_ap_dns > 1) if (wifi_ap_dns < 0 || wifi_ap_dns > 1)
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); dhcpserver_set_router(&ap_ip.ip);
if (wifi_ap_dns) { if (wifi_ap_dns) {
dhcpserver_set_dns(&ap_ip.ip); dhcpserver_set_dns(&ap_ip.ip);