diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2014-11-13 18:30:50 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2014-11-13 18:55:37 +0100 |
commit | 94a57d5e07b9e3d7f52b4ea3c8b86da9eed28baa (patch) | |
tree | 10d10dd0587e0a470ef7b88843b2a68eb97ec063 /clients | |
parent | 749cc84a957cfe6ef6e251ea97eb896a4960d9b1 (diff) | |
download | NetworkManager-94a57d5e07b9e3d7f52b4ea3c8b86da9eed28baa.tar.gz |
cli: Finish waiting for device activation when they disconnect
When wifi secrets are missing, NM_DEVICE_STATE_FAILED due to
NM_DEVICE_STATE_REASON_NO_SECRETS is immediately followed by traversal to
NM_DEVICE_STATE_DISCONNECTED as soon as the server makes sure it won't
reconnect automatically. We sometimes aren't quick to handle the first signal
and only get the latter one.
Let's treat all states that aren't ordinarily reached upon activation as bad.
Diffstat (limited to 'clients')
-rw-r--r-- | clients/cli/devices.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 3703743957..52fc1c7cb6 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1366,7 +1366,8 @@ monitor_device_state_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data g_print (_("Connection with UUID '%s' created and activated on device '%s'\n"), nm_active_connection_get_uuid (active), nm_device_get_iface (device)); quit (); - } else if (state == NM_DEVICE_STATE_FAILED) { + } else if ( state <= NM_DEVICE_STATE_DISCONNECTED + || state >= NM_DEVICE_STATE_DEACTIVATING) { reason = nm_device_get_state_reason (device); g_string_printf (nmc->return_text, _("Error: Connection activation failed: (%d) %s."), reason, nmc_device_reason_to_string (reason)); |