diff options
author | Thomas Haller <thaller@redhat.com> | 2014-12-09 11:37:33 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-01-13 11:23:22 +0100 |
commit | 750f01dfcbf0ea91d5e69a117528b44f04247b9b (patch) | |
tree | 185298cc3c9d741caab2dde2d526d4f98d3a7ab8 | |
parent | c2dc5d3b0f11dd9d9076bbc7e8500860ea00e339 (diff) | |
download | NetworkManager-750f01dfcbf0ea91d5e69a117528b44f04247b9b.tar.gz |
settings: no need to check nm_connection_compare() before nm_settings_connection_replace_settings()
nm_settings_connection_replace_settings() does nothing, if there are no changes.
-rw-r--r-- | src/settings/nm-settings-connection.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index 321cb12bf4..70be14514a 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -538,6 +538,7 @@ replace_and_commit (NMSettingsConnection *self, if (nm_settings_connection_replace_settings (self, new_connection, TRUE, &error)) { nm_settings_connection_commit_changes (self, callback, user_data); } else { + g_assert (error); if (callback) callback (self, error, user_data); g_clear_error (&error); @@ -1366,11 +1367,8 @@ update_auth_cb (NMSettingsConnection *self, con_update_cb, info); } else { - /* Do nothing if there's nothing to update */ - if (!nm_connection_compare (NM_CONNECTION (self), info->new_settings, NM_SETTING_COMPARE_FLAG_EXACT)) { - if (!nm_settings_connection_replace_settings (self, info->new_settings, TRUE, &local)) - g_assert (local); - } + if (!nm_settings_connection_replace_settings (self, info->new_settings, TRUE, &local)) + g_assert (local); con_update_cb (self, local, info); g_clear_error (&local); } |