From cca0060f1e67a37b6b490ac8689bb9da7c187dec Mon Sep 17 00:00:00 2001 From: Nirav Shah Date: Sat, 14 Apr 2012 20:52:59 +0300 Subject: [PATCH] P2P: Cleanup P2PDevice D-Bus interface for hostap-1 release This patch cleans up the P2PDevice D-Bus interface for the hostap-1 release. A spelling error is corrected and P2PDeviceProperties is renamed to clarify that this data is configuration data and not the total collection of Properties for the P2PDevice interface. Signed-hostap: Nirav Shah Signed-hostap: Angie Chinchilla intended-for: hostap-1 --- wpa_supplicant/dbus/dbus_new.c | 6 +++--- wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 16 ++++++++-------- wpa_supplicant/dbus/dbus_new_handlers_p2p.h | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index bd75a6051..0c89d1450 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -2677,9 +2677,9 @@ static const struct wpa_dbus_property_desc wpas_dbus_interface_properties[] = { }, #endif /* CONFIG_WPS */ #ifdef CONFIG_P2P - { "P2PDeviceProperties", WPAS_DBUS_NEW_IFACE_P2PDEVICE, "a{sv}", - wpas_dbus_getter_p2p_device_properties, - wpas_dbus_setter_p2p_device_properties + { "P2PDeviceConfig", WPAS_DBUS_NEW_IFACE_P2PDEVICE, "a{sv}", + wpas_dbus_getter_p2p_device_config, + wpas_dbus_setter_p2p_device_config }, { "Peers", WPAS_DBUS_NEW_IFACE_P2PDEVICE, "ao", wpas_dbus_getter_p2p_peers, diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c index 2b514e12b..8d50bcae0 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.c +++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.c @@ -704,9 +704,9 @@ DBusMessage * wpas_dbus_handler_p2p_prov_disc_req(DBusMessage *message, * P2P Device property accessor methods. */ -dbus_bool_t wpas_dbus_getter_p2p_device_properties(DBusMessageIter *iter, - DBusError *error, - void *user_data) +dbus_bool_t wpas_dbus_getter_p2p_device_config(DBusMessageIter *iter, + DBusError *error, + void *user_data) { struct wpa_supplicant *wpa_s = user_data; DBusMessageIter variant_iter, dict_iter; @@ -782,7 +782,7 @@ dbus_bool_t wpas_dbus_getter_p2p_device_properties(DBusMessageIter *iter, goto err_no_mem; /* Persistent Reconnect */ - if (!wpa_dbus_dict_append_bool(&dict_iter, "PersistantReconnect", + if (!wpa_dbus_dict_append_bool(&dict_iter, "PersistentReconnect", wpa_s->conf->persistent_reconnect)) goto err_no_mem; @@ -839,9 +839,9 @@ err_no_mem: } -dbus_bool_t wpas_dbus_setter_p2p_device_properties(DBusMessageIter *iter, - DBusError *error, - void *user_data) +dbus_bool_t wpas_dbus_setter_p2p_device_config(DBusMessageIter *iter, + DBusError *error, + void *user_data) { struct wpa_supplicant *wpa_s = user_data; DBusMessageIter variant_iter, iter_dict; @@ -927,7 +927,7 @@ dbus_bool_t wpas_dbus_setter_p2p_device_properties(DBusMessageIter *iter, (entry.type == DBUS_TYPE_UINT32) && (entry.uint32_value <= 15)) wpa_s->conf->p2p_go_intent = entry.uint32_value; - else if ((os_strcmp(entry.key, "PersistantReconnect") == 0) && + else if ((os_strcmp(entry.key, "PersistentReconnect") == 0) && (entry.type == DBUS_TYPE_BOOLEAN)) wpa_s->conf->persistent_reconnect = entry.bool_value; else if ((os_strcmp(entry.key, "ListenRegClass") == 0) && diff --git a/wpa_supplicant/dbus/dbus_new_handlers_p2p.h b/wpa_supplicant/dbus/dbus_new_handlers_p2p.h index 249f55df6..241dd7540 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers_p2p.h +++ b/wpa_supplicant/dbus/dbus_new_handlers_p2p.h @@ -94,13 +94,13 @@ DBusMessage *wpas_dbus_handler_p2p_serv_disc_external( /* * P2P Device property accessor methods. */ -dbus_bool_t wpas_dbus_setter_p2p_device_properties(DBusMessageIter *iter, - DBusError *error, - void *user_data); +dbus_bool_t wpas_dbus_setter_p2p_device_config(DBusMessageIter *iter, + DBusError *error, + void *user_data); -dbus_bool_t wpas_dbus_getter_p2p_device_properties(DBusMessageIter *iter, - DBusError *error, - void *user_data); +dbus_bool_t wpas_dbus_getter_p2p_device_config(DBusMessageIter *iter, + DBusError *error, + void *user_data); dbus_bool_t wpas_dbus_getter_p2p_peers(DBusMessageIter *iter, DBusError *error, void *user_data);