diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-03-11 23:45:25 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-03-11 23:45:25 +0100 |
commit | aee3ce108157d7776420cecca4690c597d2cee8f (patch) | |
tree | 454b1d87fdb8487616138ebaa27c115be220d1fe /src/connection.c | |
parent | 18b98a772b0ddad66b79b958b271a20879e4f225 (diff) | |
download | connman-aee3ce108157d7776420cecca4690c597d2cee8f.tar.gz connman-aee3ce108157d7776420cecca4690c597d2cee8f.tar.bz2 connman-aee3ce108157d7776420cecca4690c597d2cee8f.zip |
Add fully dynamic property storage capabilities
Diffstat (limited to 'src/connection.c')
-rw-r--r-- | src/connection.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/connection.c b/src/connection.c index d102380c..79890dc3 100644 --- a/src/connection.c +++ b/src/connection.c @@ -300,9 +300,9 @@ static DBusMessage *get_properties(DBusConnection *conn, struct connman_element *element = data; DBusMessage *reply; DBusMessageIter array, dict; - connman_uint8_t strength = 0; + connman_uint8_t strength; const char *device, *network; - const char *type = NULL; + const char *type; DBG("conn %p", conn); @@ -321,13 +321,12 @@ static DBusMessage *get_properties(DBusConnection *conn, DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict); - connman_element_get_static_property(element, "Type", &type); - + type = connman_element_get_string(element, "Type"); if (type != NULL) connman_dbus_dict_append_variant(&dict, "Type", DBUS_TYPE_STRING, &type); - connman_element_get_static_property(element, "Strength", &strength); + strength = connman_element_get_uint8(element, "Strength"); if (strength > 0) connman_dbus_dict_append_variant(&dict, "Strength", DBUS_TYPE_BYTE, &strength); |