summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-10-04 23:38:31 -0500
committerDan Williams <dcbw@redhat.com>2013-10-04 23:43:25 -0500
commit87041545b40fd0c0cfae16a8e605552b7715dc15 (patch)
treeef844cbdb0390cc1035c5495707409d12ed771fe
parent6868076e3ce77958cd9769589e535d3c4bed2274 (diff)
downloadNetworkManager-87041545b40fd0c0cfae16a8e605552b7715dc15.tar.gz
ifcfg-rh: fix ignoring updates that don't change anything
connection_from_file() requires the 'error' parameter. Not passing a valid 'error' parameter causes the function to fail and return NULL, which mean that commit_changes() would always re-write the connection instead of ignoring commits where nothing has actually changed. connection_from_file() no longer requires the unmanaged, keyfile, or routefile parameters, so remove them.
-rw-r--r--src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
index 378814995d..d3b93c9f98 100644
--- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
+++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
@@ -246,7 +246,6 @@ commit_changes (NMSettingsConnection *connection,
NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE (connection);
GError *error = NULL;
NMConnection *reread;
- char *unmanaged = NULL, *keyfile = NULL, *routefile = NULL, *route6file = NULL;
gboolean same = FALSE, success = FALSE;
char *ifcfg_path = NULL;
@@ -256,13 +255,9 @@ commit_changes (NMSettingsConnection *connection,
*/
if (priv->path) {
reread = connection_from_file (priv->path, NULL, NULL, NULL,
- &unmanaged, &keyfile, &routefile, &route6file,
- NULL, NULL);
- g_free (unmanaged);
- g_free (keyfile);
- g_free (routefile);
- g_free (route6file);
-
+ NULL, NULL, NULL, NULL,
+ &error, NULL);
+ g_clear_error (&error);
if (reread) {
same = nm_connection_compare (NM_CONNECTION (connection),
reread,