diff options
| author | Michael Biebl <biebl@debian.org> | 2017-12-12 15:53:07 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-12-12 15:53:07 +0100 |
| commit | afcd268ea7b1149fbfb66bce4eca659b675da0a2 (patch) | |
| tree | c3fca2203ad17434daf3ccf576582bd66aa41ab2 /src/settings/plugins/keyfile/nms-keyfile-connection.c | |
| parent | 417f6015c3dc8c47cf27daa59f64e0e36c521b9c (diff) | |
New upstream version 1.10.2 upstream/1.10.2
Diffstat (limited to 'src/settings/plugins/keyfile/nms-keyfile-connection.c')
| -rw-r--r-- | src/settings/plugins/keyfile/nms-keyfile-connection.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/settings/plugins/keyfile/nms-keyfile-connection.c b/src/settings/plugins/keyfile/nms-keyfile-connection.c index 300aa9f7..5a6d8a76 100644 --- a/src/settings/plugins/keyfile/nms-keyfile-connection.c +++ b/src/settings/plugins/keyfile/nms-keyfile-connection.c @@ -65,7 +65,7 @@ commit_changes (NMSettingsConnection *connection, nm_assert (out_reread_connection && !*out_reread_connection); nm_assert (!out_logmsg_change || !*out_logmsg_change); - if (!nms_keyfile_writer_connection (new_connection ?: NM_CONNECTION (connection), + if (!nms_keyfile_writer_connection (new_connection, nm_settings_connection_get_filename (connection), NM_FLAGS_ALL (commit_reason, NM_SETTINGS_CONNECTION_COMMIT_REASON_USER_ACTION | NM_SETTINGS_CONNECTION_COMMIT_REASON_ID_CHANGED), @@ -159,11 +159,14 @@ nms_keyfile_connection_new (NMConnection *source, NULL); /* Update our settings with what was read from the file */ - if (!nm_settings_connection_replace_settings (NM_SETTINGS_CONNECTION (object), - tmp, - update_unsaved, - NULL, - error)) { + if (!nm_settings_connection_update (NM_SETTINGS_CONNECTION (object), + tmp, + update_unsaved + ? NM_SETTINGS_CONNECTION_PERSIST_MODE_UNSAVED + : NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP, + NM_SETTINGS_CONNECTION_COMMIT_REASON_NONE, + NULL, + error)) { g_object_unref (object); object = NULL; } |