mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 00:30:09 +01:00
settings: split nm_settings_connection_commit_changes() to call it without preparing the new connection
Will be used next.
This commit is contained in:
parent
9531da8b3e
commit
75f787d1da
1 changed files with 21 additions and 6 deletions
|
|
@ -655,11 +655,12 @@ nm_settings_connection_replace_settings (NMSettingsConnection *self,
|
|||
error);
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_settings_connection_commit_changes (NMSettingsConnection *self,
|
||||
NMConnection *new_connection,
|
||||
NMSettingsConnectionCommitReason commit_reason,
|
||||
GError **error)
|
||||
static gboolean
|
||||
_commit_changes_full (NMSettingsConnection *self,
|
||||
NMConnection *new_connection,
|
||||
gboolean prepare_new_connection,
|
||||
NMSettingsConnectionCommitReason commit_reason,
|
||||
GError **error)
|
||||
{
|
||||
NMSettingsConnectionClass *klass;
|
||||
gs_free_error GError *local = NULL;
|
||||
|
|
@ -679,7 +680,8 @@ nm_settings_connection_commit_changes (NMSettingsConnection *self,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if ( new_connection
|
||||
if ( prepare_new_connection
|
||||
&& new_connection
|
||||
&& !nm_settings_connection_replace_settings_prepare (self,
|
||||
new_connection,
|
||||
&local)) {
|
||||
|
|
@ -731,6 +733,19 @@ nm_settings_connection_commit_changes (NMSettingsConnection *self,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_settings_connection_commit_changes (NMSettingsConnection *self,
|
||||
NMConnection *new_connection,
|
||||
NMSettingsConnectionCommitReason commit_reason,
|
||||
GError **error)
|
||||
{
|
||||
return _commit_changes_full (self,
|
||||
new_connection,
|
||||
TRUE,
|
||||
commit_reason,
|
||||
error);
|
||||
}
|
||||
|
||||
static void
|
||||
remove_entry_from_db (NMSettingsConnection *self, const char* db_name)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue