D-Bus: Set last_scan_req to MANUAL_SCAN_REQ on Scan() trigger paths
authorJouni Malinen <j@w1.fi>
Tue, 11 Aug 2015 18:44:31 +0000 (21:44 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 11 Aug 2015 18:44:31 +0000 (21:44 +0300)
commit1fbff0b5c489379784d344eac0644974b8e4f738
tree5a4be3ccb530d0618000eb6735a484afde9f9100
parentfbcddaed9aa62587e7b74cd22df4b4cdaca6b101
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>
wpa_supplicant/dbus/dbus_new_handlers.c