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.
This commit is contained in:
Alvin Šipraga 2020-06-01 19:11:17 +02:00 committed by Denis Kenzior
parent 8b1161ec8e
commit cae6949ce1
1 changed files with 3 additions and 0 deletions

View File

@ -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;