network-manager-applet r996 - in trunk: . src/connection-editor src/gconf-helpers



Author: dcbw
Date: Fri Oct 31 18:06:18 2008
New Revision: 996
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=996&view=rev

Log:
2008-10-31  Dan Williams  <dcbw redhat com>

	* src/gconf-helpers/nma-gconf-connection.c
		- (update): actually save private values like cert and key paths

	* src/connection-editor/nm-connection-list.c
		- (add_connection): fill certificate and private key items before adding
			so that cert data actually gets to the system settings service
		- (update_connection): copy private values before trying to update the
			connection so that they actually get saved



Modified:
   trunk/ChangeLog
   trunk/src/connection-editor/nm-connection-list.c
   trunk/src/gconf-helpers/nma-gconf-connection.c

Modified: trunk/src/connection-editor/nm-connection-list.c
==============================================================================
--- trunk/src/connection-editor/nm-connection-list.c	(original)
+++ trunk/src/connection-editor/nm-connection-list.c	Fri Oct 31 18:06:18 2008
@@ -495,7 +495,10 @@
 	if (scope == NM_CONNECTION_SCOPE_SYSTEM) {
 		GError *error = NULL;
 
+		utils_fill_connection_certs (connection);
 		success = nm_dbus_settings_system_add_connection (self->system_settings, connection, &error);
+		utils_clear_filled_connection_certs (connection);
+
 		if (!success) {
 			gboolean pending_auth = FALSE;
 
@@ -666,14 +669,17 @@
 		gboolean success;
 		gboolean pending_auth = FALSE;
 
+		utils_fill_connection_certs (modified);
 		new_settings = nm_connection_to_hash (modified);
-		success = nm_exported_connection_update (original, new_settings, &error);
-		g_hash_table_destroy (new_settings);
 
 		/* Hack; make sure that gconf private values are copied */
 		nm_gconf_copy_private_connection_values (nm_exported_connection_get_connection (original),
 		                                         modified);
 
+		success = nm_exported_connection_update (original, new_settings, &error);
+		g_hash_table_destroy (new_settings);
+		utils_clear_filled_connection_certs (modified);
+
 		if (!success) {
 			if (is_permission_denied_error (error))
 				pending_auth = obtain_auth (error, update_connection_cb, info);

Modified: trunk/src/gconf-helpers/nma-gconf-connection.c
==============================================================================
--- trunk/src/gconf-helpers/nma-gconf-connection.c	(original)
+++ trunk/src/gconf-helpers/nma-gconf-connection.c	Fri Oct 31 18:06:18 2008
@@ -331,6 +331,9 @@
 		            g_type_name (nm_connection_lookup_setting_type_by_quark ((*error)->domain)),
 		            (*error)->message, (*error)->code);
 	} else {
+		/* Copy private values to the connection that actually gets saved */
+		nm_gconf_copy_private_connection_values (tmp, nm_exported_connection_get_connection (exported));
+
 		nm_gconf_write_connection (tmp, priv->client, priv->dir);
 		g_object_unref (tmp);
 



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