diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-01-10 00:14:49 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-01-10 00:14:49 +0100 |
commit | a6dfb61cc396b06c7a52bbba4391c553f426109d (patch) | |
tree | 4af5bf248c63be1607e4c752a960e9ddf02bacba | |
parent | 934c74f21b4cf9f8387b97dedfd6b4fbffe94ade (diff) | |
download | connman-gnome-a6dfb61cc396b06c7a52bbba4391c553f426109d.tar.gz |
Remove secrets from the storage if not available anymore
-rw-r--r-- | common/client.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/common/client.c b/common/client.c index 1afb283..55b30cf 100644 --- a/common/client.c +++ b/common/client.c @@ -244,7 +244,8 @@ static void ipv4_notify(DBusGProxy *object, handle_ipv4(hash, &iter); } -static void handle_network(GHashTable *hash, GtkTreeIter *iter) +static void handle_network(GHashTable *hash, + GtkTreeIter *iter, gboolean secrets) { GValue *value; const char *str; @@ -261,7 +262,10 @@ static void handle_network(GHashTable *hash, GtkTreeIter *iter) str = g_value_get_string(value); gtk_tree_store_set(store, iter, CLIENT_COLUMN_NETWORK_PSK, str, -1); - } + } else if (secrets == TRUE) + gtk_tree_store_set(store, iter, + CLIENT_COLUMN_NETWORK_PSK, NULL, -1); + } static void network_notify(DBusGProxy *object, @@ -291,7 +295,7 @@ static void network_notify(DBusGProxy *object, user_data) == FALSE) return; - handle_network(hash, &iter); + handle_network(hash, &iter, TRUE); } static void properties_notify(DBusGProxy *object, @@ -452,7 +456,7 @@ static void network_changed(DBusGProxy *proxy, GHashTable *hash, user_data) == FALSE) return; - handle_network(hash, &iter); + handle_network(hash, &iter, FALSE); index = gtk_tree_model_get_string_from_iter(model, &iter); |