commit 7ba4f53c57732951d3716cf90edec514ade39a50
parent 5ff23af29ead36867fccc16f31f677724240a824
Author: Denis Kenzior <denkenz@gmail.com>
Date: Mon, 15 Jul 2019 15:52:01 -0500
scan: Make sure to reset triggered for aborted scans
If the scan was triggered and later aborted, make sure to reset the
triggered value when the CMD_NEW_SCAN_RESULTS event comes in.
src/station.c:station_enter_state() Old State: disconnected, new state: connecting
src/scan.c:scan_notify() Scan notification 33
src/station.c:station_netdev_event() Associating
src/scan.c:scan_notify() Scan notification 34
Aborting (signal 11) [/home/denkenz/iwd-master/src/iwd]
++++++++ backtrace ++++++++
#0 0x7efd4d6a2ef0 in /lib64/libc.so.6
#1 0x42b20d in scan_notify() at src/scan.c:1383
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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