3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-26 09:32:34 +01:00

scan: Fix failure handling in common scan triggering logic

Fix incorrect usage of the caller’s scan triggered callback.
In case of a failure, destroy scan request and notify caller
about the issue by returning zero scan id instead of calling
callers’ scan triggered callback with an error code.
This commit is contained in:
Tim Kourt 2018-11-26 16:00:00 -08:00 committed by Denis Kenzior
parent d9c89e89c6
commit 0536a9bdd5

View File

@ -480,7 +480,7 @@ static uint32_t scan_common(uint32_t ifindex, bool passive,
if (!scan_request_send_next(sc, sr))
goto done;
scan_request_trigger_failed(sr, -EIO);
scan_request_free(sr);
return 0;
done:
l_queue_push_tail(sc->requests, sr);