From cae6949ce13c97f4c24be25b982374981068f63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= Date: Mon, 1 Jun 2020 19:11:17 +0200 Subject: [PATCH] scan: Do not start new requests while suspended If scanning is suspended, have scan_common() queue its scan request rather than issuing it immediately. This respects the assumption that scans are not requested while sc->suspended is true. --- src/scan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scan.c b/src/scan.c index 718f7497..8fc1f026 100644 --- a/src/scan.c +++ b/src/scan.c @@ -546,6 +546,9 @@ static uint32_t scan_common(uint64_t wdev_id, bool passive, if (!l_queue_isempty(sc->requests)) goto done; + if (sc->suspended) + goto done; + if (sc->state != SCAN_STATE_NOT_RUNNING) goto done;