From e357d15023dffd2e84b3d1fdc76a37a46a60de74 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 6 Feb 2019 11:43:02 +0100 Subject: [PATCH] Revert "cli: verify connections before sending them over to daemon" Just calling nm_connection_verify() is not correct. We need nm_connection_normalize() because otherwise we miss out on places where we have common normalization steps implemented to fix a connection. This is also what server-side is done. Revert the patch, as it breaks CI tests. I wonder also whether this is the right place. There are already several places in "clients/cli/connections.c" that call verify() and normalize(). These places should be unified so that there is one place where we complete the connection. And it probably should be done as a separate step before the add_new_connection()/update_connection() calls. This reverts commit ca58bcca0c3cfc6ae44f4a6c7c227590405e6d7c. --- clients/cli/connections.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 8781e902c3..b8fac54e5c 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -4834,17 +4834,6 @@ add_new_connection (gboolean persistent, GAsyncReadyCallback callback, gpointer user_data) { - GError *error = NULL; - - if ( !nm_connection_verify (connection, &error) - || !nm_connection_verify_secrets (connection, &error)) { - g_simple_async_report_take_gerror_in_idle (G_OBJECT (client), - callback, - user_data, - error); - return; - } - nm_client_add_connection_async (client, connection, persistent, NULL, callback, user_data); } @@ -4855,18 +4844,6 @@ update_connection (gboolean persistent, GAsyncReadyCallback callback, gpointer user_data) { - GError *error = NULL; - - if ( !nm_connection_verify (NM_CONNECTION (connection), &error) - || !nm_connection_verify_secrets (NM_CONNECTION (connection), &error)) { - g_simple_async_report_take_gerror_in_idle (G_OBJECT (connection), - callback, - user_data, - error); - return; - } - - nm_remote_connection_commit_changes_async (connection, persistent, NULL, callback, user_data); }