diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-04-23 10:00:47 -0400 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-04-23 10:22:26 -0400 |
commit | 29fe1abf0dd77658cc2244b277817b99bd8159e8 (patch) | |
tree | db19182156f6cb84ae640a180886be414215b2ab | |
parent | 245720819e704b50e97d8b7dfb7c6f206f10df68 (diff) | |
download | NetworkManager-29fe1abf0dd77658cc2244b277817b99bd8159e8.tar.gz |
cli: stop waiting for deactivation if device reaches unmanaged state
default-unmanaged devices enter unmanaged state right after they're
disconnected.
-rw-r--r-- | clients/cli/devices.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 11c584d2a1..1c9f5881d6 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1610,7 +1610,7 @@ disconnect_state_cb (NMDevice *device, GParamSpec *pspec, DeviceCbInfo *info) if (!g_slist_find (info->queue, device)) return; - if (nm_device_get_state (device) == NM_DEVICE_STATE_DISCONNECTED) { + if (nm_device_get_state (device) <= NM_DEVICE_STATE_DISCONNECTED) { g_print (_("Device '%s' successfully disconnected.\n"), nm_device_get_iface (device)); device_cb_info_finish (info, device); @@ -1669,9 +1669,9 @@ disconnect_device_cb (GObject *object, GAsyncResult *result, gpointer user_data) device_cb_info_finish (info, device); } else { state = nm_device_get_state (device); - if (nmc->nowait_flag || state == NM_DEVICE_STATE_DISCONNECTED) { + if (nmc->nowait_flag || state <= NM_DEVICE_STATE_DISCONNECTED) { /* Don't want to wait or device already disconnected */ - if (state == NM_DEVICE_STATE_DISCONNECTED) { + if (state <= NM_DEVICE_STATE_DISCONNECTED) { if (nmc->print_output == NMC_PRINT_PRETTY) nmc_terminal_erase_line (); g_print (_("Device '%s' successfully disconnected.\n"), |