summaryrefslogtreecommitdiff
path: root/clients/cli/connections.c
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-04-23 22:24:36 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-04-24 16:18:25 +0200
commit2d347e7e176e7cb8daaa2e02b0758821fc3f5f04 (patch)
tree627cb53646eef80143342317c676c6427ca188a2 /clients/cli/connections.c
parentfb9f28a323a95ca143bd346f7da678e6e21c822f (diff)
downloadNetworkManager-2d347e7e176e7cb8daaa2e02b0758821fc3f5f04.tar.gz
cli: don't wait for connection change on update failure
When saving a connection, we wait the connection-changed signal before proceeding to ensure that the remote connection is up to date. However, no signal is emitted if the update fails and so we shouldn't wait for it. Fixes: a370faeb59a9 ('cli: wait for changed signal after updating a connection'): https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/124 https://bugzilla.redhat.com/show_bug.cgi?id=1702203
Diffstat (limited to 'clients/cli/connections.c')
-rw-r--r--clients/cli/connections.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 0abbe8358f..2c4b8d2478 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -7814,8 +7814,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
while (!nmc_editor_cb_called && !timeout)
g_main_context_iteration (NULL, TRUE);
- while (!connection_changed && !timeout)
- g_main_context_iteration (NULL, TRUE);
+ if (!nmc_editor_error) {
+ while (!connection_changed && !timeout)
+ g_main_context_iteration (NULL, TRUE);
+ }
if (handler_id)
g_signal_handler_disconnect (rem_con, handler_id);