diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 4157598055..2a459bb64f 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4618,7 +4618,7 @@ disconnect_cb (NMDevice *device, TRUE); nm_device_state_changed (device, - NM_DEVICE_STATE_DISCONNECTED, + NM_DEVICE_STATE_DEACTIVATING, NM_DEVICE_STATE_REASON_USER_REQUESTED); dbus_g_method_return (context); } @@ -6304,6 +6304,9 @@ nm_device_state_changed (NMDevice *device, nm_device_queue_state (device, NM_DEVICE_STATE_UNMANAGED, NM_DEVICE_STATE_REASON_NONE); } break; + case NM_DEVICE_STATE_DEACTIVATING: + nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, reason); + break; case NM_DEVICE_STATE_DISCONNECTED: if (old_state > NM_DEVICE_STATE_DISCONNECTED && priv->default_unmanaged) nm_device_queue_state (device, NM_DEVICE_STATE_UNMANAGED, NM_DEVICE_STATE_REASON_NONE); diff --git a/src/nm-manager.c b/src/nm-manager.c index 2f4785257d..d3fa52436e 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -3489,9 +3489,8 @@ nm_manager_deactivate_connection (NMManager *manager, "The VPN connection was not active."); } else { g_assert (NM_IS_ACT_REQUEST (active)); - /* FIXME: use DEACTIVATING state */ nm_device_state_changed (nm_active_connection_get_device (active), - NM_DEVICE_STATE_DISCONNECTED, + NM_DEVICE_STATE_DEACTIVATING, reason); success = TRUE; }