mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 21:38:06 +02:00
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.
This commit is contained in:
parent
6868076e3c
commit
87041545b4
1 changed files with 3 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue