aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-11 18:44:31 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-11 18:44:31 (GMT)
commit1fbff0b5c489379784d344eac0644974b8e4f738 (patch)
tree5a4be3ccb530d0618000eb6735a484afde9f9100 /wpa_supplicant/dbus/dbus_new_handlers.c
parentfbcddaed9aa62587e7b74cd22df4b4cdaca6b101 (diff)
downloadhostap-1fbff0b5c489379784d344eac0644974b8e4f738.zip
hostap-1fbff0b5c489379784d344eac0644974b8e4f738.tar.gz
hostap-1fbff0b5c489379784d344eac0644974b8e4f738.tar.bz2
D-Bus: Set last_scan_req to MANUAL_SCAN_REQ on Scan() trigger paths
The D-Bus Scan() handler was setting wpa_s->scan_req = MANUAL_SCAN_REQ on the code path that used wpa_supplicant_req_scan(). However, it did not do anything similar for the cases where wpa_supplicant_trigger_scan() is called directly. This could result in unexpected wpa_s->last_scan_req value and incorrect behavior especially when using ap_scan=2 and running a scan while operating in AP mode. Fix this by explicitly setting wpa_s->last_scan_req = MANUAL_SCAN_REQ when using wpa_supplicant_trigger_scan() from the Scan() handler. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 1c04e92..67562a5 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -1341,6 +1341,7 @@ DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,
}
if (params.freqs && params.freqs[0]) {
+ wpa_s->last_scan_req = MANUAL_SCAN_REQ;
if (wpa_supplicant_trigger_scan(wpa_s,
&params)) {
reply = wpas_dbus_error_scan_error(
@@ -1367,6 +1368,7 @@ DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,
wpa_supplicant_cancel_sched_scan(wpa_s);
}
+ wpa_s->last_scan_req = MANUAL_SCAN_REQ;
if (wpa_supplicant_trigger_scan(wpa_s, &params)) {
reply = wpas_dbus_error_scan_error(
message, "Scan request rejected");