summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-03-08 17:28:35 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-03-08 17:28:35 +0100
commit79cb26df419c7e9234618c82aad408f61b76f31c (patch)
tree8883f4a3efd8caa46530c15135fb299bd34512ed
parentc5767e0eef17648dd083347ea3f1bf4ef391f313 (diff)
downloadconnman-79cb26df419c7e9234618c82aad408f61b76f31c.tar.gz
connman-79cb26df419c7e9234618c82aad408f61b76f31c.tar.bz2
connman-79cb26df419c7e9234618c82aad408f61b76f31c.zip
Use the network list from the hash table
-rw-r--r--src/device.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index 43026462..a354fe23 100644
--- a/src/device.c
+++ b/src/device.c
@@ -237,6 +237,15 @@ static int set_policy(DBusConnection *connection,
return 0;
}
+static void append_path(gpointer key, gpointer value, gpointer user_data)
+{
+ struct connman_element *element = value;
+ DBusMessageIter *iter = user_data;
+
+ dbus_message_iter_append_basic(iter, DBUS_TYPE_OBJECT_PATH,
+ &element->path);
+}
+
static void append_networks(struct connman_device *device,
DBusMessageIter *entry)
{
@@ -251,8 +260,7 @@ static void append_networks(struct connman_device *device,
dbus_message_iter_open_container(&value, DBUS_TYPE_ARRAY,
DBUS_TYPE_OBJECT_PATH_AS_STRING, &iter);
- __connman_element_list((struct connman_element *) device,
- CONNMAN_ELEMENT_TYPE_NETWORK, &iter);
+ g_hash_table_foreach(device->networks, append_path, &iter);
dbus_message_iter_close_container(&value, &iter);
dbus_message_iter_close_container(entry, &value);