aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2016-08-10 16:35:34 (GMT)
committerJouni Malinen <j@w1.fi>2016-08-13 18:11:04 (GMT)
commit5f040be4ff78f26b84840fa31037831bdd886f5b (patch)
treeac75f637a933f9c4069c10fd86a90bdb50dfe624 /wpa_supplicant/dbus
parent478441bf81ee565440fd012a7e71f160788c59bd (diff)
downloadhostap-5f040be4ff78f26b84840fa31037831bdd886f5b.zip
hostap-5f040be4ff78f26b84840fa31037831bdd886f5b.tar.gz
hostap-5f040be4ff78f26b84840fa31037831bdd886f5b.tar.bz2
Move disconnect command handling to a common place
Move out the disconnect command handling from |ctrl_iface.c| to |wpa_supplicant.c| so that it can be reused across the different control interfaces (socket, dbus & binder). Signed-off-by: Roshan Pius <rpius@google.com>
Diffstat (limited to 'wpa_supplicant/dbus')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c5
-rw-r--r--wpa_supplicant/dbus/dbus_old_handlers.c3
2 files changed, 2 insertions, 6 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index de6d216..8ccace5 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -1475,10 +1475,7 @@ DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message,
struct wpa_supplicant *wpa_s)
{
if (wpa_s->current_ssid != NULL) {
- wpa_s->disconnected = 1;
- wpa_supplicant_deauthenticate(wpa_s,
- WLAN_REASON_DEAUTH_LEAVING);
-
+ wpas_request_disconnection(wpa_s);
return NULL;
}
diff --git a/wpa_supplicant/dbus/dbus_old_handlers.c b/wpa_supplicant/dbus/dbus_old_handlers.c
index e8f62ef..3561a24 100644
--- a/wpa_supplicant/dbus/dbus_old_handlers.c
+++ b/wpa_supplicant/dbus/dbus_old_handlers.c
@@ -1069,8 +1069,7 @@ out:
DBusMessage * wpas_dbus_iface_disconnect(DBusMessage *message,
struct wpa_supplicant *wpa_s)
{
- wpa_s->disconnected = 1;
- wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+ wpas_request_disconnection(wpa_s);
return wpas_dbus_new_success_reply(message);
}