mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 08:10:08 +01:00
cli: connections: fail the activation if the ac deactivates
Since commitac888de151("cli/connections: fail the activation when the active connection disappears") we rely only on the disappearing of the active-connection to determine the failure of an activation. libnm can collapse a 'added' and a 'removed' signal if they are received closer enough and thus we may miss the removal of the active connection. Restore the detection of failure based on active-connection state. (cherry picked from commit79a357b07a)
This commit is contained in:
parent
41823a0774
commit
10fbc47d32
1 changed files with 4 additions and 0 deletions
|
|
@ -2179,6 +2179,10 @@ active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, Activ
|
|||
g_print (_("Connection successfully activated (D-Bus active path: %s)\n"),
|
||||
nm_object_get_path (NM_OBJECT (active)));
|
||||
activate_connection_info_finish (info);
|
||||
} else if (state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) {
|
||||
g_string_printf (nmc->return_text, _("Error: Connection activation failed."));
|
||||
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
|
||||
activate_connection_info_finish (info);
|
||||
} else if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING) {
|
||||
/* activating master connection does not automatically activate any slaves, so their
|
||||
* active connection state will not progress beyond ACTIVATING state.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue