[network-manager-applet/polkit1] gconf: copy over cert paths when creating new GConf connection



commit 7c90ede3e6338ad6197098254a67cc0f70d51364
Author: Dan Williams <dcbw redhat com>
Date:   Tue Aug 25 11:11:45 2009 -0500

    gconf: copy over cert paths when creating new GConf connection
    
    Otherwise verification will fail when nm_connection_replace_settings()
    gets done replacing the settings.

 src/gconf-helpers/nma-gconf-connection.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/gconf-helpers/nma-gconf-connection.c b/src/gconf-helpers/nma-gconf-connection.c
index eca69d3..b792b55 100644
--- a/src/gconf-helpers/nma-gconf-connection.c
+++ b/src/gconf-helpers/nma-gconf-connection.c
@@ -144,11 +144,20 @@ nma_gconf_connection_new_from_connection (GConfClient *client,
 
 	self = NMA_GCONF_CONNECTION (object);
 
-	// FIXME: fill certs before hashing?  or copy private values?
+	/* Fill certs so that the nm_connection_replace_settings verification works */
+	utils_fill_connection_certs (connection);
 	settings = nm_connection_to_hash (connection);
+	utils_clear_filled_connection_certs (connection);
+
 	success = nm_connection_replace_settings (NM_CONNECTION (self), settings, NULL);
 	g_hash_table_destroy (settings);
 
+	/* Then clear the filled certs on the replaced settings, and copy over
+	 * applet private values like file locations and such.
+	 */
+	utils_clear_filled_connection_certs (NM_CONNECTION (self));
+	nm_gconf_copy_private_connection_values (NM_CONNECTION (self), connection);
+
 	/* Already verified the settings above, they had better be OK */
 	g_assert (success);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]