device: during activating device transit to DISCONNECTED state

When activating a device, we must progress the device state to
disconnected state.

This matters when activating a device without carrier. In this
case we would have skipped DISCONNECTED state. Skipping the
device state then leads to other issues like a slave device
never noticing that the master got ready.
This commit is contained in:
Thomas Haller 2015-12-09 12:13:19 +01:00
parent 2d1d187493
commit e967cbd0bf

View file

@ -2808,7 +2808,7 @@ _internal_activate_device (NMManager *self, NMActiveConnection *active, GError *
NM_DEVICE_STATE_REASON_USER_REQUESTED);
}
if ( nm_device_is_available (device, NM_DEVICE_CHECK_DEV_AVAILABLE_NONE)
if ( nm_device_is_available (device, NM_DEVICE_CHECK_DEV_AVAILABLE_FOR_USER_REQUEST)
&& (nm_device_get_state (device) == NM_DEVICE_STATE_UNAVAILABLE)) {
nm_device_state_changed (device,
NM_DEVICE_STATE_DISCONNECTED,