1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-08 12:53:45 +01:00

[wifi] Optimize logging to reduce flash usage by 284 bytes on ESP8266 (#11022)

This commit is contained in:
J. Nick Koston
2025-10-05 19:03:26 -05:00
committed by GitHub
parent f26e71bae6
commit f62e06104e
3 changed files with 53 additions and 47 deletions

View File

@@ -408,11 +408,11 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
#if (ESP_IDF_VERSION_MAJOR >= 5) && (ESP_IDF_VERSION_MINOR >= 1)
err = esp_eap_client_set_certificate_and_key((uint8_t *) eap.client_cert, client_cert_len + 1,
(uint8_t *) eap.client_key, client_key_len + 1,
(uint8_t *) eap.password.c_str(), strlen(eap.password.c_str()));
(uint8_t *) eap.password.c_str(), eap.password.length());
#else
err = esp_wifi_sta_wpa2_ent_set_cert_key((uint8_t *) eap.client_cert, client_cert_len + 1,
(uint8_t *) eap.client_key, client_key_len + 1,
(uint8_t *) eap.password.c_str(), strlen(eap.password.c_str()));
(uint8_t *) eap.password.c_str(), eap.password.length());
#endif
if (err != ESP_OK) {
ESP_LOGV(TAG, "set_cert_key failed %d", err);