aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorSaurav Babu <saurav.babu@samsung.com>2017-04-13 03:58:11 (GMT)
committerJouni Malinen <j@w1.fi>2017-05-07 19:08:43 (GMT)
commit193950541950cd725b9864923572c6366d77e609 (patch)
tree46614f07ec85ccca5204f9093d47d5b35ddff354 /wpa_supplicant/dbus/dbus_new_handlers.c
parent13d36cce89ca3e98a72bf249ed032c61dbb610e0 (diff)
downloadhostap-193950541950cd725b9864923572c6366d77e609.zip
hostap-193950541950cd725b9864923572c6366d77e609.tar.gz
hostap-193950541950cd725b9864923572c6366d77e609.tar.bz2
dbus: Add AbortScan method to abort ongoing scan
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 56e6aab..84016e1 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -1419,6 +1419,27 @@ out:
}
+/*
+ * wpas_dbus_handler_abort_scan - Request an ongoing scan to be aborted
+ * @message: Pointer to incoming dbus message
+ * @wpa_s: wpa_supplicant structure for a network interface
+ * Returns: Abort failed or no scan in progress DBus error message on failure
+ * or NULL otherwise.
+ *
+ * Handler function for "AbortScan" method call of network interface.
+ */
+DBusMessage * wpas_dbus_handler_abort_scan(DBusMessage *message,
+ struct wpa_supplicant *wpa_s)
+{
+ if (wpas_abort_ongoing_scan(wpa_s) < 0)
+ return dbus_message_new_error(
+ message, WPAS_DBUS_ERROR_IFACE_SCAN_ERROR,
+ "Abort failed or no scan in progress");
+
+ return NULL;
+}
+
+
/**
* wpas_dbus_handler_signal_poll - Request immediate signal properties
* @message: Pointer to incoming dbus message