fix(esp_wifi): Fix bug where wps_finish is called recursively

This commit is contained in:
Kapil Gupta
2026-01-20 09:54:36 +05:30
committed by BOT
parent a208625e7a
commit ac3f1055c0
2 changed files with 5 additions and 0 deletions
@@ -681,6 +681,10 @@ static int wps_finish(void)
}
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);
#ifdef CONFIG_WPS_RECONNECT_ON_FAIL
@@ -31,6 +31,7 @@ typedef struct {
enum wps_sm_state {
WAIT_START,
WPA_MESG,
WPA_FINISH_PROCESS,
WPA_FAIL
};
#endif /* ESP_SUPPLICANT */