[PATCH 2/8] add ConfigFile to AddInterface properties

Sam Leffler sleffler
Thu Mar 17 15:39:47 PDT 2011


This provides feature parity with the old-style D-bus api.  Explicit
properties to control global parameters is preferred preferred but until
that happens this allows doing things like setting pkcs11_engine_path
and pkgcs11_module_path via D-bus.
---
 wpa_supplicant/dbus/dbus_new_handlers.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index e41fc16..02ace9b 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -567,6 +567,7 @@ DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message,
 	struct wpa_dbus_dict_entry entry;
 	char *driver = NULL;
 	char *ifname = NULL;
+	char *confname = NULL;
 	char *bridge_ifname = NULL;
 
 	dbus_message_iter_init(message, &iter);
@@ -588,6 +589,12 @@ DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message,
 			wpa_dbus_dict_entry_clear(&entry);
 			if (ifname == NULL)
 				goto error;
+		} else if (!strcmp(entry.key, "ConfigFile") &&
+			   (entry.type == DBUS_TYPE_STRING)) {
+			confname = os_strdup(entry.str_value);
+			wpa_dbus_dict_entry_clear(&entry);
+			if (confname == NULL)
+				goto error;
 		} else if (!strcmp(entry.key, "BridgeIfname") &&
 			   (entry.type == DBUS_TYPE_STRING)) {
 			bridge_ifname = os_strdup(entry.str_value);
@@ -618,6 +625,7 @@ DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message,
 		os_memset(&iface, 0, sizeof(iface));
 		iface.driver = driver;
 		iface.ifname = ifname;
+		iface.confname = confname;
 		iface.bridge_ifname = bridge_ifname;
 		/* Otherwise, have wpa_supplicant attach to it. */
 		if ((wpa_s = wpa_supplicant_add_iface(global, &iface))) {
-- 
1.7.3.1




More information about the Hostap mailing list