diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-11-23 13:51:11 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-11-23 13:51:11 +0100 |
commit | 987f2dbc1f6bd78a1d86ceddba997506d3786322 (patch) | |
tree | 66db4aa51e9345d44434ff91f89202b44f8ffd42 | |
parent | 48c33ec217373971a7ff411e50e64fcdc27c53a6 (diff) | |
download | connman-987f2dbc1f6bd78a1d86ceddba997506d3786322.tar.gz connman-987f2dbc1f6bd78a1d86ceddba997506d3786322.tar.bz2 connman-987f2dbc1f6bd78a1d86ceddba997506d3786322.zip |
Show empty passphrase property if security value is present
-rw-r--r-- | src/element.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/element.c b/src/element.c index 2ed2361e..d66c81b9 100644 --- a/src/element.c +++ b/src/element.c @@ -218,12 +218,18 @@ static DBusMessage *get_properties(DBusConnection *conn, connman_dbus_dict_append_variant(&dict, "IPv4.Gateway", DBUS_TYPE_STRING, &element->ipv4.gateway); - if (element->wifi.security != NULL) + if (element->wifi.security != NULL) { + const char *passphrase = ""; + connman_dbus_dict_append_variant(&dict, "WiFi.Security", DBUS_TYPE_STRING, &element->wifi.security); - if (element->wifi.passphrase != NULL) + + if (element->wifi.passphrase != NULL) + passphrase = element->wifi.passphrase; + connman_dbus_dict_append_variant(&dict, "WiFi.Passphrase", - DBUS_TYPE_STRING, &element->wifi.passphrase); + DBUS_TYPE_STRING, &passphrase); + } connman_element_lock(element); |