diff options
Diffstat (limited to 'src/settings/plugins/ifnet')
| -rw-r--r-- | src/settings/plugins/ifnet/nms-ifnet-connection.c | 17 | ||||
| -rw-r--r-- | src/settings/plugins/ifnet/nms-ifnet-plugin.c | 13 |
2 files changed, 17 insertions, 13 deletions
diff --git a/src/settings/plugins/ifnet/nms-ifnet-connection.c b/src/settings/plugins/ifnet/nms-ifnet-connection.c index 5dbb124c..e7cd19cd 100644 --- a/src/settings/plugins/ifnet/nms-ifnet-connection.c +++ b/src/settings/plugins/ifnet/nms-ifnet-connection.c @@ -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, @@ -186,11 +186,14 @@ nm_ifnet_connection_new (NMConnection *source, const char *conn_name) object = (GObject *) g_object_new (NM_TYPE_IFNET_CONNECTION, NULL); NM_IFNET_CONNECTION_GET_PRIVATE ((NMIfnetConnection *) object)->conn_name = g_strdup (conn_name); - if (!nm_settings_connection_replace_settings (NM_SETTINGS_CONNECTION (object), - tmp, - update_unsaved, - NULL, - NULL)) { + 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, + NULL)) { g_object_unref (object); return NULL; } diff --git a/src/settings/plugins/ifnet/nms-ifnet-plugin.c b/src/settings/plugins/ifnet/nms-ifnet-plugin.c index 998b04b4..38d23f30 100644 --- a/src/settings/plugins/ifnet/nms-ifnet-plugin.c +++ b/src/settings/plugins/ifnet/nms-ifnet-plugin.c @@ -269,11 +269,12 @@ reload_connections (NMSettingsPlugin *config) } } else { /* Update existing connection with new settings */ - if (!nm_settings_connection_replace_settings (NM_SETTINGS_CONNECTION (old), - NM_CONNECTION (new), - FALSE, /* don't set Unsaved */ - "ifnet-update", - &error)) { + if (!nm_settings_connection_update (NM_SETTINGS_CONNECTION (old), + NM_CONNECTION (new), + NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP, + NM_SETTINGS_CONNECTION_COMMIT_REASON_NONE, + "ifnet-update", + &error)) { /* Shouldn't ever get here as 'new' was verified by the reader already * and the UUID did not change. */ g_assert_not_reached (); @@ -519,5 +520,5 @@ settings_plugin_interface_init (NMSettingsPluginInterface *plugin_iface) G_MODULE_EXPORT GObject * nm_settings_plugin_factory (void) { - return g_object_ref (settings_plugin_ifnet_get ()); + return G_OBJECT (g_object_ref (settings_plugin_ifnet_get ())); } |