diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-04-22 15:08:21 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-05-12 17:26:25 +0200 |
commit | 72baf9fa2498d54dd9f545af0054dd6de7d5ff2e (patch) | |
tree | 7fb1369e8ba8c57c2543cb1190eeeb6c18ceab9a /src | |
parent | 067202b34e5a0aa33b441a6e12574cec569d7edb (diff) | |
download | NetworkManager-72baf9fa2498d54dd9f545af0054dd6de7d5ff2e.tar.gz |
manager: AddAndActivateConnection(): don't save until the connection is activatable
https://bugzilla.redhat.com/show_bug.cgi?id=1174164
Diffstat (limited to 'src')
-rw-r--r-- | src/nm-manager.c | 4 | ||||
-rw-r--r-- | src/settings/nm-settings.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 4a7c1f9aa2..11f9d67794 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -3017,6 +3017,7 @@ activation_add_done (NMSettings *self, nm_active_connection_set_connection (info->active, NM_CONNECTION (new_connection)); if (_internal_activate_generic (info->manager, info->active, &local)) { + nm_settings_connection_commit_changes (new_connection, NULL, NULL); dbus_g_method_return (context, nm_connection_get_path (NM_CONNECTION (new_connection)), nm_active_connection_get_path (info->active)); @@ -3027,6 +3028,7 @@ activation_add_done (NMSettings *self, g_assert (error); _internal_activation_failed (info->manager, info->active, error->message); + nm_settings_connection_delete (new_connection, NULL, NULL); dbus_g_method_return_error (context, error); g_clear_error (&local); @@ -3056,7 +3058,7 @@ _add_and_activate_auth_done (NMActiveConnection *active, /* Basic sender auth checks performed; try to add the connection */ nm_settings_add_connection_dbus (priv->settings, nm_active_connection_get_connection (active), - TRUE, + FALSE, context, activation_add_done, info); diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 2c0f8e3337..51258790b4 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -1119,7 +1119,7 @@ pk_add_cb (NMAuthChain *chain, NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self); NMAuthCallResult result; GError *error = NULL; - NMConnection *connection; + NMConnection *connection = NULL; NMSettingsConnection *added = NULL; NMSettingsAddCallback callback; gpointer callback_data; @@ -1159,7 +1159,7 @@ pk_add_cb (NMAuthChain *chain, callback (self, added, error, context, callback_data); /* Send agent-owned secrets to the agents */ - if (!error && added) + if (!error && added && nm_settings_has_connection (self, added)) send_agent_owned_secrets (self, added, subject); g_clear_error (&error); |