aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
diff options
context:
space:
mode:
authorNishant Chaprana <n.chaprana@samsung.com>2015-05-26 05:05:47 (GMT)
committerJouni Malinen <j@w1.fi>2015-05-29 18:05:17 (GMT)
commit333039596ed97a830a585f38df28928e67b7ab4f (patch)
tree2d36724248f99d62e789b052f4412804b5a72dbc /wpa_supplicant/dbus/dbus_new_handlers_p2p.c
parent2a8e3f35ef6153204cac98b0233304fa238b7300 (diff)
downloadhostap-333039596ed97a830a585f38df28928e67b7ab4f.zip
hostap-333039596ed97a830a585f38df28928e67b7ab4f.tar.gz
hostap-333039596ed97a830a585f38df28928e67b7ab4f.tar.bz2
P2P: Add P2P Cancel method over D-Bus interface
This patch adds P2P Cancel method over fi.w1.wpa_supplicant1.Interface.P2PDevice dbus interface. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers_p2p.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers_p2p.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
index 9419ba8..e3e2378 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c
@@ -575,6 +575,26 @@ inv_args:
}
+/**
+ * wpas_dbus_handler_p2p_cancel - Cancel P2P group formation
+ * @message: Pointer to incoming dbus message
+ * @wpa_s: %wpa_supplicant data structure
+ * Returns: NULL on success or DBus error on failure
+ *
+ * Handler for "Cancel" method call. Returns NULL if P2P cancel succeeds or DBus
+ * error on P2P cancel failure
+ */
+DBusMessage * wpas_dbus_handler_p2p_cancel(DBusMessage *message,
+ struct wpa_supplicant *wpa_s)
+{
+ if (wpas_p2p_cancel(wpa_s))
+ return wpas_dbus_error_unknown_error(message,
+ "P2P cancel failed");
+
+ return NULL;
+}
+
+
DBusMessage * wpas_dbus_handler_p2p_invite(DBusMessage *message,
struct wpa_supplicant *wpa_s)
{