provisioning: Fix enable CONFIG_EXAMPLE_RESET_PROVISIONED will cause device crash

Closes https://github.com/espressif/esp-idf/issues/6240
pull/6718/head
yuanjm 2021-02-05 20:29:18 +08:00 zatwierdzone przez bot
rodzic deac2fbeb9
commit 850053caad
4 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -283,7 +283,8 @@ esp_err_t app_prov_is_provisioned(bool *provisioned)
*provisioned = false;
#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED
nvs_flash_erase();
esp_wifi_restore();
return ESP_OK;
#endif
/* Get WiFi Station configuration */

Wyświetl plik

@ -221,7 +221,8 @@ esp_err_t app_prov_is_provisioned(bool *provisioned)
*provisioned = false;
#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED
nvs_flash_erase();
esp_wifi_restore();
return ESP_OK;
#endif
/* Get WiFi Station configuration */

Wyświetl plik

@ -246,7 +246,8 @@ esp_err_t app_prov_is_provisioned(bool *provisioned)
*provisioned = false;
#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED
nvs_flash_erase();
esp_wifi_restore();
return ESP_OK;
#endif
/* Get WiFi Station configuration */

Wyświetl plik

@ -232,7 +232,8 @@ esp_err_t app_prov_is_provisioned(bool *provisioned)
*provisioned = false;
#ifdef CONFIG_EXAMPLE_RESET_PROVISIONED
nvs_flash_erase();
esp_wifi_restore();
return ESP_OK;
#endif
/* Get WiFi Station configuration */