From 9f19a4843310a93d28b5ca6964f025907762daa8 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Fri, 3 Feb 2017 12:19:07 +0100 Subject: [PATCH] scan: Call trigger callback on netlink error Also call the trigger callback with an error code when sending the netlink command fails after the scan request has been queued because another scan was in progress when the scan was requested. --- src/scan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scan.c b/src/scan.c index 7eaae619..bfd0c2a5 100644 --- a/src/scan.c +++ b/src/scan.c @@ -201,6 +201,9 @@ static void start_next_scan_request(void *userdata) sc->start_cmd_id = scan_send_start(&sr->start_cmd, scan_done, sc); if (!sc->start_cmd_id) { + if (sr->trigger) + sr->trigger(-EIO, sr->userdata); + if (sr->destroy) sr->destroy(sr->userdata);