mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 00:38:07 +02:00
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.
(cherry picked from commit 750f01dfcb)
This commit is contained in:
parent
d0283bc9e6
commit
857b5bc345
1 changed files with 3 additions and 5 deletions
|
|
@ -535,6 +535,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);
|
||||
|
|
@ -1364,11 +1365,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue