diff --git a/src/scan.c b/src/scan.c index aa405ebc..aed3bbb1 100644 --- a/src/scan.c +++ b/src/scan.c @@ -1394,13 +1394,13 @@ static void scan_notify(struct l_genl_msg *msg, void *user_data) /* Was this our own scan or an external scan */ if (sc->triggered) { + sc->triggered = false; + if (!sr->callback) { scan_finished(sc, -ECANCELED, NULL, sr); break; } - sc->triggered = false; - /* * If this was the last command for the current request * avoid starting the next request until the GET_SCAN