mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 15:35:59 -07:00
fix
This commit is contained in:
@@ -982,7 +982,7 @@ bool WiFiComponent::wifi_ap_ip_config_(const optional<ManualIP> &manual_ip) {
|
||||
// This provides a standards-compliant way for clients to discover the captive portal
|
||||
if (captive_portal::global_captive_portal != nullptr) {
|
||||
// Buffer must be static - dhcps_set_option_info stores pointer, doesn't copy
|
||||
static char captive_portal_uri[7 + network::IP_ADDRESS_BUFFER_SIZE]; // "http://" + IP
|
||||
static char captive_portal_uri[24]; // "http://" (7) + IPv4 max (15) + null
|
||||
memcpy(captive_portal_uri, "http://", 7);
|
||||
network::IPAddress(&info.ip).str_to(captive_portal_uri + 7);
|
||||
err = esp_netif_dhcps_option(s_ap_netif, ESP_NETIF_OP_SET, ESP_NETIF_CAPTIVEPORTAL_URI, captive_portal_uri,
|
||||
|
||||
Reference in New Issue
Block a user