mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 13:50:36 +01:00
settings: pass new_connection to commit_changes() and fix ifnet
ifnet shall use the new_connection argument, not NM_CONNECTION(self). Also, let the caller of the virtual function provide the right new_connection, not having the virtual function figure that out.
This commit is contained in:
parent
141dfd600c
commit
8a675f3d13
4 changed files with 5 additions and 5 deletions
|
|
@ -597,7 +597,7 @@ nm_settings_connection_update (NMSettingsConnection *self,
|
|||
|
||||
if (persist_mode == NM_SETTINGS_CONNECTION_PERSIST_MODE_DISK) {
|
||||
if (!klass->commit_changes (self,
|
||||
new_connection,
|
||||
new_connection ?: NM_CONNECTION (self),
|
||||
commit_reason,
|
||||
&reread_connection,
|
||||
&logmsg_change,
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ commit_changes (NMSettingsConnection *connection,
|
|||
nm_assert (!out_logmsg_change || !*out_logmsg_change);
|
||||
|
||||
filename = nm_settings_connection_get_filename (connection);
|
||||
if (!nms_ifcfg_rh_writer_write_connection (new_connection ?: NM_CONNECTION (connection),
|
||||
if (!nms_ifcfg_rh_writer_write_connection (new_connection,
|
||||
IFCFG_DIR,
|
||||
filename,
|
||||
&ifcfg_path,
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ commit_changes (NMSettingsConnection *connection,
|
|||
g_signal_emit (connection, signals[IFNET_CANCEL_MONITORS], 0);
|
||||
|
||||
if (priv->conn_name) {
|
||||
success = ifnet_update_parsers_by_connection (NM_CONNECTION (connection),
|
||||
success = ifnet_update_parsers_by_connection (new_connection,
|
||||
priv->conn_name,
|
||||
CONF_NET_FILE,
|
||||
WPA_SUPPLICANT_CONF,
|
||||
|
|
@ -102,7 +102,7 @@ commit_changes (NMSettingsConnection *connection,
|
|||
error);
|
||||
} else {
|
||||
added = TRUE;
|
||||
success = ifnet_add_new_connection (NM_CONNECTION (connection),
|
||||
success = ifnet_add_new_connection (new_connection,
|
||||
CONF_NET_FILE,
|
||||
WPA_SUPPLICANT_CONF,
|
||||
&new_name,
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue