From 0536a9bdd5deb4710098e57ca8b04075b663cfb3 Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Mon, 26 Nov 2018 16:00:00 -0800 Subject: [PATCH] scan: Fix failure handling in common scan triggering logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scan.c b/src/scan.c index f6188758..283e7a6e 100644 --- a/src/scan.c +++ b/src/scan.c @@ -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);