From e1593df4bd65507767fae2e6941346fa5bee30d6 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 19 Jan 2022 16:22:55 -0600 Subject: [PATCH] scan: Call scan_finished if results->sr is NULL results->sr is set to NULL for 'opportunistic' scans which were triggered externally. See scan_notify() for details. However, get_scan_done would only invoke scan_finished (and thus the periodic scan callback sc->sp.callback) only if the scan queue was empty. It should do so in all cases. --- src/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scan.c b/src/scan.c index 15d84ed7..55264fe3 100644 --- a/src/scan.c +++ b/src/scan.c @@ -1735,7 +1735,7 @@ static void get_scan_done(void *user) sc->get_scan_cmd_id = 0; - if (l_queue_peek_head(sc->requests) == results->sr) + if (!results->sr || l_queue_peek_head(sc->requests) == results->sr) scan_finished(sc, 0, results->bss_list, results->freqs, results->sr); else