mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
fix(wifi_prov_mgr): Fixed wifi_prov_mgr_deinit api return type
1. Updated the return type for wifi_prov_mgr_deinit api from void to esp_err_t. 2. Due to void type unable to trace the api failure.
This commit is contained in:
@@ -147,7 +147,10 @@ static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
break;
|
||||
case WIFI_PROV_END:
|
||||
/* De-initialize manager once provisioning is finished */
|
||||
wifi_prov_mgr_deinit();
|
||||
esp_err_t err = wifi_prov_mgr_deinit();
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to de-initialize provisioning manager: %s", esp_err_to_name(err));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -520,7 +523,7 @@ void app_main(void)
|
||||
|
||||
/* We don't need the manager as device is already provisioned,
|
||||
* so let's release it's resources */
|
||||
wifi_prov_mgr_deinit();
|
||||
ESP_ERROR_CHECK(wifi_prov_mgr_deinit());
|
||||
|
||||
ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL));
|
||||
/* Start Wi-Fi station */
|
||||
|
Reference in New Issue
Block a user