From fe94cc16ed39937261ccd3b721efd9a423a867ac Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 19 May 2009 00:13:35 -0700 Subject: [PATCH] Add driver property when adding new interface --- plugins/supplicant.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 2355333..47e39e1 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -260,7 +260,9 @@ done: static int add_interface(struct supplicant_task *task) { + const char *driver = "wext"; DBusMessage *message; + DBusMessageIter array, dict; DBusPendingCall *call; DBG("task %p", task); @@ -270,8 +272,20 @@ static int add_interface(struct supplicant_task *task) if (message == NULL) return -ENOMEM; - dbus_message_append_args(message, DBUS_TYPE_STRING, &task->ifname, - DBUS_TYPE_INVALID); + dbus_message_iter_init_append(message, &array); + + dbus_message_iter_append_basic(&array, + DBUS_TYPE_STRING, &task->ifname); + + dbus_message_iter_open_container(&array, DBUS_TYPE_ARRAY, + DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING + DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING + DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict); + + connman_dbus_dict_append_variant(&dict, "driver", + DBUS_TYPE_STRING, &driver); + + dbus_message_iter_close_container(&array, &dict); if (dbus_connection_send_with_reply(connection, message, &call, TIMEOUT) == FALSE) { -- 2.7.4