2008-11-19 Dan Williams <dcbw@redhat.com>

* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_replace_settings): take a GError

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-dbus-connection.c
	  src/nm-manager.c
	  system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/plugins/keyfile/plugin.c
		- Handle, or don't handle, errors from nm_connection_replace_settings()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4298 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-11-19 15:09:05 +00:00
parent 68a2fc9739
commit 3c2d8253ec
9 changed files with 89 additions and 32 deletions

View File

@@ -133,11 +133,22 @@ update_connection_settings (NMExportedConnection *orig,
{
NMConnection *wrapped;
GHashTable *new_settings;
GError *error = NULL;
new_settings = nm_connection_to_hash (nm_exported_connection_get_connection (new));
wrapped = nm_exported_connection_get_connection (orig);
nm_connection_replace_settings (wrapped, new_settings);
nm_exported_connection_signal_updated (orig, new_settings);
if (nm_connection_replace_settings (wrapped, new_settings, &error))
nm_exported_connection_signal_updated (orig, new_settings);
else {
g_warning ("%s: '%s' / '%s' invalid: %d",
__func__,
error ? g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)) : "(none)",
(error && error->message) ? error->message : "(none)",
error ? error->code : -1);
g_clear_error (&error);
nm_exported_connection_signal_removed (orig);
}
g_hash_table_destroy (new_settings);
}