From: Marcel Holtmann Date: Sun, 14 Dec 2008 02:45:00 +0000 (+0100) Subject: Don't include network list for Ethernet devices X-Git-Tag: 0.3~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cbd718323c5fe44459db0cf1df3441e51b9de23;p=platform%2Fupstream%2Fconnman.git Don't include network list for Ethernet devices --- diff --git a/src/element.c b/src/element.c index e082229..5081ff3 100644 --- a/src/element.c +++ b/src/element.c @@ -422,10 +422,6 @@ static void append_networks(struct connman_element *element, DBusMessageIter value, iter; const char *key = "Networks"; - if (element->subtype != CONNMAN_ELEMENT_SUBTYPE_WIFI && - element->subtype != CONNMAN_ELEMENT_SUBTYPE_WIMAX) - return; - dbus_message_iter_append_basic(entry, DBUS_TYPE_STRING, &key); dbus_message_iter_open_container(entry, DBUS_TYPE_VARIANT, @@ -476,12 +472,13 @@ static DBusMessage *device_get_properties(DBusConnection *conn, connman_dbus_dict_append_variant(&dict, "Powered", DBUS_TYPE_BOOLEAN, &element->enabled); - dbus_message_iter_open_container(&dict, DBUS_TYPE_DICT_ENTRY, + if (element->subtype == CONNMAN_ELEMENT_SUBTYPE_WIFI || + element->subtype == CONNMAN_ELEMENT_SUBTYPE_WIMAX) { + dbus_message_iter_open_container(&dict, DBUS_TYPE_DICT_ENTRY, NULL, &entry); - - append_networks(element, &entry); - - dbus_message_iter_close_container(&dict, &entry); + append_networks(element, &entry); + dbus_message_iter_close_container(&dict, &entry); + } add_common_properties(element, &dict);