cli: fix a regression in monitoring addresses vs. method changes

while editing an existing commention.
It was broken by commit 45590f809a that called
nm_connection_replace_settings_from_connection() which replaces settings with
connected signal handlers.
This commit is contained in:
Jiří Klimeš
2014-11-06 12:47:17 +01:00
parent 4b09f58555
commit 32600a9035

View File

@@ -7109,12 +7109,6 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
g_weak_ref_init (&weak, con_tmp); g_weak_ref_init (&weak, con_tmp);
rem_con = g_weak_ref_get (&weak); 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) { while (cmd_loop) {
/* Connection is dirty? (not saved or differs from the saved) */ /* Connection is dirty? (not saved or differs from the saved) */
dirty = is_connection_dirty (connection, rem_con); dirty = is_connection_dirty (connection, rem_con);
@@ -8021,6 +8015,9 @@ do_connection_edit (NmCli *nmc, int argc, char **argv)
goto error; 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 /* Duplicate the connection and use that so that we need not
* differentiate existing vs. new later * differentiate existing vs. new later
*/ */