Merge branch 'bugfix/wifi_prov_mgr_event_end_missing' into 'master'

Bugfix wifi_prov_mgr : Added missing esp_event_post() for WIFI_PROV_END events

See merge request espressif/esp-idf!5522
This commit is contained in:
Angus Gratton 2019-07-16 13:53:08 +08:00
commit a6b39f0c64

View file

@ -512,6 +512,10 @@ static void prov_stop_task(void *arg)
if (app_cb) { if (app_cb) {
app_cb(app_data, WIFI_PROV_END, NULL); app_cb(app_data, WIFI_PROV_END, NULL);
} }
if (esp_event_post(WIFI_PROV_EVENT, WIFI_PROV_END, NULL, 0, portMAX_DELAY) != ESP_OK) {
ESP_LOGE(TAG, "Failed to post event WIFI_PROV_END");
}
vTaskDelete(NULL); vTaskDelete(NULL);
} }
} }
@ -1346,6 +1350,9 @@ void wifi_prov_mgr_deinit(void)
if (app_cb) { if (app_cb) {
app_cb(app_data, WIFI_PROV_END, NULL); app_cb(app_data, WIFI_PROV_END, NULL);
} }
if (esp_event_post(WIFI_PROV_EVENT, WIFI_PROV_END, NULL, 0, portMAX_DELAY) != ESP_OK) {
ESP_LOGE(TAG, "Failed to post event WIFI_PROV_END");
}
} }
ESP_LOGD(TAG, "execute_event_cb : %d", WIFI_PROV_DEINIT); ESP_LOGD(TAG, "execute_event_cb : %d", WIFI_PROV_DEINIT);
@ -1357,7 +1364,9 @@ void wifi_prov_mgr_deinit(void)
if (app_cb) { if (app_cb) {
app_cb(app_data, WIFI_PROV_DEINIT, NULL); app_cb(app_data, WIFI_PROV_DEINIT, NULL);
} }
esp_event_post(WIFI_PROV_EVENT, WIFI_PROV_DEINIT, NULL, 0, portMAX_DELAY); if (esp_event_post(WIFI_PROV_EVENT, WIFI_PROV_DEINIT, NULL, 0, portMAX_DELAY) != ESP_OK) {
ESP_LOGE(TAG, "Failed to post event WIFI_PROV_DEINIT");
}
} }
esp_err_t wifi_prov_mgr_start_provisioning(wifi_prov_security_t security, const char *pop, esp_err_t wifi_prov_mgr_start_provisioning(wifi_prov_security_t security, const char *pop,