mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wifi_provisioning: decouple wifi_prov_mgr_is_provisioned
from manager state
`wifi_prov_mgr_is_provisioned()` API uses the `esp_wifi_get_config()` API to check if Wi-Fi credentials are configured. It does not really require any other information from the wifi_prov component. Hence, this commit removed dependency of this API on provisioning manager initialization state. Closes IDF-5878
This commit is contained in:
parent
58c5c15f7e
commit
025a8378ef
@ -266,7 +266,6 @@ void wifi_prov_mgr_deinit(void);
|
||||
* - ESP_OK : Retrieved provision state successfully
|
||||
* - ESP_FAIL : Wi-Fi not initialized
|
||||
* - ESP_ERR_INVALID_ARG : Null argument supplied
|
||||
* - ESP_ERR_INVALID_STATE : Manager not initialized
|
||||
*/
|
||||
esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned);
|
||||
|
||||
|
@ -1112,11 +1112,6 @@ esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned)
|
||||
|
||||
*provisioned = false;
|
||||
|
||||
if (!prov_ctx_lock) {
|
||||
ESP_LOGE(TAG, "Provisioning manager not initialized");
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
/* Get Wi-Fi Station configuration */
|
||||
wifi_config_t wifi_cfg;
|
||||
if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user