aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorJose Blanquicet <blanquicet@gmail.com>2016-08-23 12:16:00 (GMT)
committerJouni Malinen <j@w1.fi>2016-08-29 08:43:53 (GMT)
commitb44d9c760fda85797187f1d0e97be47ed0182ed6 (patch)
tree2e2437410f4f04f2f7a6f5c30af4dbd3436d6dc5 /wpa_supplicant/dbus/dbus_new_handlers.c
parent7dcec248814beacd40d7df55d4a2524199910ba2 (diff)
downloadhostap-b44d9c760fda85797187f1d0e97be47ed0182ed6.zip
hostap-b44d9c760fda85797187f1d0e97be47ed0182ed6.tar.gz
hostap-b44d9c760fda85797187f1d0e97be47ed0182ed6.tar.bz2
D-Bus: Add ConfigFile parameter into the interface properties
This patch aims to expose the configuration file path as an interface property, like is done with the driver and the bridge name. Doing so, higher layer programs become responsible to recreate interfaces with the correct configuration file path when programs need to remove them. Signed-off-by: Jose Blanquicet <blanquicet@gmail.com>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index f185f27..e11dd36 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -3240,6 +3240,30 @@ dbus_bool_t wpas_dbus_getter_bridge_ifname(
/**
+ * wpas_dbus_getter_config_file - Get interface configuration file path
+ * @iter: Pointer to incoming dbus message iter
+ * @error: Location to store error on failure
+ * @user_data: Function specific data
+ * Returns: TRUE on success, FALSE on failure
+ *
+ * Getter for "ConfigFile" property.
+ */
+dbus_bool_t wpas_dbus_getter_config_file(
+ const struct wpa_dbus_property_desc *property_desc,
+ DBusMessageIter *iter, DBusError *error, void *user_data)
+{
+ struct wpa_supplicant *wpa_s = user_data;
+ char *confname = "";
+
+ if (wpa_s->confname)
+ confname = wpa_s->confname;
+
+ return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_STRING,
+ &confname, error);
+}
+
+
+/**
* wpas_dbus_getter_bsss - Get array of BSSs objects
* @iter: Pointer to incoming dbus message iter
* @error: Location to store error on failure