diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-30 12:46:18 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-12-05 11:50:52 +0100 |
commit | 4fd5e6e1bb7ee12a389a741212c899d3e15b27f1 (patch) | |
tree | fe2365a684f00080826a7b3cc72be61fd3b03c39 | |
parent | 9988f9dbbb4261e28d92b6dc6e0b9d8567028794 (diff) | |
download | NetworkManager-4fd5e6e1bb7ee12a389a741212c899d3e15b27f1.tar.gz |
settings: in _commit_changes_full() mark the connection as saved before emitting signals
_commit_changes_full() calls _replace_settings_full() which already emits signals
about the changed connection. We should mark the connectin as saved earlier.
In fact, we can tell _replace_settings_full() to mark it as not-unsaved
via the persist-mode parameter.
-rw-r--r-- | src/settings/nm-settings-connection.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index e0275613aa..394099d61e 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -711,7 +711,7 @@ _commit_changes_full (NMSettingsConnection *self, if (!_replace_settings_full (self, reread_connection ?: new_connection, !reread_connection, - NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP, + NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK, new_connection ? "update-during-write" : "replace-and-commit-disk", @@ -723,9 +723,8 @@ _commit_changes_full (NMSettingsConnection *self, g_propagate_error (error, g_steal_pointer (&local)); g_return_val_if_reached (FALSE); } - } - - set_unsaved (self, FALSE); + } else + set_unsaved (self, FALSE); if (reread_connection) _LOGI ("write: successfully updated (%s), connection was modified in the process", logmsg_change); |