diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-31 20:08:24 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-31 20:08:24 -0800 |
commit | 6fcddc2d61694348525ad7c1edce6f405eabead8 (patch) | |
tree | 103ee5ab8c5cd635bc5e4765f9f99dea61ffef1a /tools | |
parent | fb2a03c1b128e6c79103ebc098fa394b7c2bf4c3 (diff) | |
download | connman-6fcddc2d61694348525ad7c1edce6f405eabead8.tar.gz connman-6fcddc2d61694348525ad7c1edce6f405eabead8.tar.bz2 connman-6fcddc2d61694348525ad7c1edce6f405eabead8.zip |
Add support for supplicant signals with included properties
Diffstat (limited to 'tools')
-rw-r--r-- | tools/supplicant.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/tools/supplicant.c b/tools/supplicant.c index f5695f4f..d3ea5531 100644 --- a/tools/supplicant.c +++ b/tools/supplicant.c @@ -504,11 +504,12 @@ static void network_property(const char *key, DBusMessageIter *iter, if (key == NULL) return; - DBG("key %s type %c", key, dbus_message_iter_get_arg_type(iter)); + //DBG("key %s type %c", key, dbus_message_iter_get_arg_type(iter)); } static void interface_network_added(DBusMessageIter *iter, void *user_data) { + //struct supplicant_interface *interface = user_data; const char *path = NULL; dbus_message_iter_get_basic(iter, &path); @@ -518,7 +519,12 @@ static void interface_network_added(DBusMessageIter *iter, void *user_data) if (g_strcmp0(path, "/") == 0) return; - DBG("path %s", path); + dbus_message_iter_next(iter); + if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_INVALID) { + supplicant_dbus_property_foreach(iter, network_property, NULL); + network_property(NULL, NULL, NULL); + return; + } supplicant_dbus_property_get_all(path, SUPPLICANT_INTERFACE ".Interface.Network", @@ -841,6 +847,13 @@ static void interface_bss_added(DBusMessageIter *iter, void *user_data) bss->interface = interface; bss->path = g_strdup(path); + dbus_message_iter_next(iter); + if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_INVALID) { + supplicant_dbus_property_foreach(iter, bss_property, bss); + bss_property(NULL, NULL, bss); + return; + } + supplicant_dbus_property_get_all(path, SUPPLICANT_INTERFACE ".Interface.BSS", bss_property, bss); @@ -985,6 +998,14 @@ static void interface_added(DBusMessageIter *iter, void *user_data) if (interface == NULL) return; + dbus_message_iter_next(iter); + if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_INVALID) { + supplicant_dbus_property_foreach(iter, interface_property, + interface); + interface_property(NULL, NULL, interface); + return; + } + supplicant_dbus_property_get_all(path, SUPPLICANT_INTERFACE ".Interface", interface_property, interface); |