Skip to content

Commit 928b07b

Browse files
author
akshat
committed
bugfix(wifi): Reset scan_ongoing flag in scan done event to allow scan trigger post roam
1 parent fbfa32c commit 928b07b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/esp_wifi/wifi_apps/roaming_app/src/roaming_app.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,11 +638,13 @@ static void scan_done_event_handler(void *arg, ETS_STATUS status)
638638
esp_wifi_scan_get_ap_records(&g_roaming_app.scanned_aps.current_count, g_roaming_app.scanned_aps.ap_records);
639639
print_ap_records(&g_roaming_app.scanned_aps);
640640
parse_scan_results_and_roam();
641-
g_roaming_app.scan_ongoing = false;
642641
ROAM_SCAN_RESULTS_UNLOCK();
643-
} else {
644-
ESP_LOGD(ROAMING_TAG, "Scan Done with error %d ", status);
642+
} else {
643+
ESP_LOGD(ROAMING_TAG, "Scan Done with error %d ", status);
645644
}
645+
ROAM_SCAN_RESULTS_LOCK();
646+
g_roaming_app.scan_ongoing = false;
647+
ROAM_SCAN_RESULTS_UNLOCK();
646648
}
647649
static void conduct_scan(void)
648650
{

0 commit comments

Comments
 (0)