mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(wifi): Call DHCP server API only if DHCPS enabled
Closes https://github.com/espressif/esp-idf/issues/14006
This commit is contained in:
parent
bbd7c5f6e2
commit
c6c980b893
@ -465,8 +465,10 @@ esp_err_t esp_netif_create_default_wifi_mesh_netifs(esp_netif_t **p_netif_sta, e
|
||||
ESP_ERROR_CHECK(esp_netif_attach_wifi_ap(netif_ap));
|
||||
ESP_ERROR_CHECK(esp_wifi_set_default_wifi_ap_handlers());
|
||||
|
||||
#ifdef CONFIG_LWIP_DHCPS
|
||||
// ...and stop DHCP server to keep the ESP_NETIF_DHCP_STOPPED state
|
||||
ESP_ERROR_CHECK(esp_netif_dhcps_stop(netif_ap));
|
||||
#endif
|
||||
|
||||
// Create "almost" default station, but with un-flagged DHCP client
|
||||
memcpy(&netif_cfg, ESP_NETIF_BASE_DEFAULT_WIFI_STA, sizeof(netif_cfg));
|
||||
|
Loading…
x
Reference in New Issue
Block a user