From 32600a9035ca46f05f2730d5be5e4f72ab5f99f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Thu, 6 Nov 2014 12:47:17 +0100 Subject: [PATCH] cli: fix a regression in monitoring addresses vs. method changes while editing an existing commention. It was broken by commit 45590f809addf82531616a55a30d4f4656f128e6 that called nm_connection_replace_settings_from_connection() which replaces settings with connected signal handlers. --- clients/cli/connections.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 1d51047ba..174ad8dfe 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -7109,12 +7109,6 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t g_weak_ref_init (&weak, con_tmp); rem_con = g_weak_ref_get (&weak); - /* Merge secrets into the connection */ - if (rem_con) { - update_secrets_in_connection (rem_con); - nm_connection_replace_settings_from_connection (connection, NM_CONNECTION (rem_con)); - } - while (cmd_loop) { /* Connection is dirty? (not saved or differs from the saved) */ dirty = is_connection_dirty (connection, rem_con); @@ -8021,6 +8015,9 @@ do_connection_edit (NmCli *nmc, int argc, char **argv) goto error; } + /* Merge secrets into the connection */ + update_secrets_in_connection (NM_REMOTE_CONNECTION (found_con)); + /* Duplicate the connection and use that so that we need not * differentiate existing vs. new later */