aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvin Šipraga <alsi@bang-olufsen.dk>2020-06-01 19:11:17 +0200
committerDenis Kenzior <denkenz@gmail.com>2020-06-04 13:17:42 -0500
commitcae6949ce13c97f4c24be25b982374981068f63a (patch)
tree85505edd0764e13411067fb8e78703ebc02d0ab9
parent8b1161ec8eaba3fa3f7d86e4a7b9a623a1bf2a01 (diff)
downloadiwd-cae6949ce13c97f4c24be25b982374981068f63a.tar.gz
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.
-rw-r--r--src/scan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scan.c b/src/scan.c
index 718f74972..8fc1f0261 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;