[gnome-control-center/gnome-3-34] network: Correctly print warning if failed to save to libsecret
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-34] network: Correctly print warning if failed to save to libsecret
- Date: Mon, 30 Mar 2020 01:48:44 +0000 (UTC)
commit 1ed9dff658308171bc390807d35e9b5b59b4c66f
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Sep 13 14:17:20 2019 +1200
network: Correctly print warning if failed to save to libsecret
Also don't leak the GError
panels/network/connection-editor/ce-page.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page.c b/panels/network/connection-editor/ce-page.c
index e3c9e0415..2746bb606 100644
--- a/panels/network/connection-editor/ce-page.c
+++ b/panels/network/connection-editor/ce-page.c
@@ -299,16 +299,14 @@ ce_page_complete_init (CEPage *page,
g_variant_unref (setting_dict);
/* Update the connection with the new secrets */
- if (nm_connection_update_secrets (page->connection,
- setting_name,
- secrets,
- &update_error)) {
- /* Success */
- emit_initialized (page, NULL);
- return;
+ if (!nm_connection_update_secrets (page->connection,
+ setting_name,
+ secrets,
+ &update_error)) {
+ g_warning ("Couldn't update secrets: %s", update_error->message);
+ g_error_free (update_error);
}
- g_warning ("Failed to update connection secrets due to an unknown error.");
emit_initialized (page, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]