|
|
a31528 |
From ac383b87ffd097b67b0b1cd2818df0e41bb17903 Mon Sep 17 00:00:00 2001
|
|
|
a31528 |
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
|
a31528 |
Date: Tue, 23 Apr 2019 22:24:36 +0200
|
|
|
a31528 |
Subject: [PATCH] cli: don't wait for connection change on update failure
|
|
|
a31528 |
|
|
|
a31528 |
When saving a connection, we wait the connection-changed signal before
|
|
|
a31528 |
proceeding to ensure that the remote connection is up to date.
|
|
|
a31528 |
However, no signal is emitted if the update fails and so we shouldn't
|
|
|
a31528 |
wait for it.
|
|
|
a31528 |
|
|
|
a31528 |
Fixes: a370faeb59a9 ('cli: wait for changed signal after updating a connection'):
|
|
|
a31528 |
|
|
|
a31528 |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/124
|
|
|
a31528 |
https://bugzilla.redhat.com/show_bug.cgi?id=1702203
|
|
|
a31528 |
(cherry picked from commit 2d347e7e176e7cb8daaa2e02b0758821fc3f5f04)
|
|
|
a31528 |
(cherry picked from commit 3423629ff0fc65c16c2a4c541a5fc3435cd72091)
|
|
|
a31528 |
---
|
|
|
a31528 |
clients/cli/connections.c | 6 ++++--
|
|
|
a31528 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
a31528 |
|
|
|
a31528 |
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
|
|
|
a31528 |
index 034fc19f5..7bfbe0b6a 100644
|
|
|
a31528 |
--- a/clients/cli/connections.c
|
|
|
a31528 |
+++ b/clients/cli/connections.c
|
|
|
a31528 |
@@ -7817,8 +7817,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
|
|
|
a31528 |
while (!nmc_editor_cb_called && !timeout)
|
|
|
a31528 |
g_main_context_iteration (NULL, TRUE);
|
|
|
a31528 |
|
|
|
a31528 |
- while (!connection_changed && !timeout)
|
|
|
a31528 |
- g_main_context_iteration (NULL, TRUE);
|
|
|
a31528 |
+ if (!nmc_editor_error) {
|
|
|
a31528 |
+ while (!connection_changed && !timeout)
|
|
|
a31528 |
+ g_main_context_iteration (NULL, TRUE);
|
|
|
a31528 |
+ }
|
|
|
a31528 |
|
|
|
a31528 |
if (handler_id)
|
|
|
a31528 |
g_signal_handler_disconnect (rem_con, handler_id);
|
|
|
a31528 |
--
|
|
|
a31528 |
2.20.1
|
|
|
a31528 |
|