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:24:25 -0400 |
commit | b05c9d67e78354c03da5d0f7cac4b5e1671eaee3 (patch) | |
tree | d727f99b0047e9fbe9dcdfaa978ff9180eb398ee | |
parent | 1fff1a3d36788391fc004601c4b3f8da449b3760 (diff) | |
download | NetworkManager-b05c9d67e78354c03da5d0f7cac4b5e1671eaee3.tar.gz |
cli: stop waiting for deactivation if device reaches unmanaged state
default-unmanaged devices enter unmanaged state right after they're
disconnected.
(cherry picked from commit 29fe1abf0dd77658cc2244b277817b99bd8159e8)
-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 9b3ea14681..1633f0ce5b 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1645,7 +1645,7 @@ disconnect_state_cb (NMDevice *device, GParamSpec *pspec, gpointer user_data) state = nm_device_get_state (device); - if (state == NM_DEVICE_STATE_DISCONNECTED) { + if (state <= NM_DEVICE_STATE_DISCONNECTED) { g_signal_handlers_disconnect_by_data (device, user_data); g_print (_("Device '%s' successfully disconnected.\n"), nm_device_get_iface (device)); @@ -1682,9 +1682,9 @@ disconnect_device_cb (GObject *object, GAsyncResult *result, gpointer user_data) } 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' has been disconnected.\n"), nm_device_get_iface (device)); |