mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'bugfix/wps_finish_bug_v6.0' into 'release/v6.0'
fix(esp_wifi): Fix bug where wps_finish is called recursively (v6.0) See merge request espressif/esp-idf!45660
This commit is contained in:
@@ -681,6 +681,10 @@ static int wps_finish(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sm->wps->state == WPS_FINISHED) {
|
if (sm->wps->state == WPS_FINISHED) {
|
||||||
|
if (sm->state == WPA_FINISH_PROCESS) {
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
sm->state = WPA_FINISH_PROCESS;
|
||||||
bool connect = (sm->ap_cred_cnt == 1);
|
bool connect = (sm->ap_cred_cnt == 1);
|
||||||
|
|
||||||
#ifdef CONFIG_WPS_RECONNECT_ON_FAIL
|
#ifdef CONFIG_WPS_RECONNECT_ON_FAIL
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ typedef struct {
|
|||||||
enum wps_sm_state {
|
enum wps_sm_state {
|
||||||
WAIT_START,
|
WAIT_START,
|
||||||
WPA_MESG,
|
WPA_MESG,
|
||||||
|
WPA_FINISH_PROCESS,
|
||||||
WPA_FAIL
|
WPA_FAIL
|
||||||
};
|
};
|
||||||
#endif /* ESP_SUPPLICANT */
|
#endif /* ESP_SUPPLICANT */
|
||||||
|
|||||||
Reference in New Issue
Block a user