core: fix case of unmanaged device being managed at startup (rh #494527)
device_start() would unconditionally transition the device to UNAVAILABLE no matter what the initial managed setting was. There was a short window for a race with HAL where device_start() wouldn't get canceled if HAL was starting up in parallel with NetworkManager.
This commit is contained in:
@@ -150,7 +150,10 @@ device_start (gpointer user_data)
|
|||||||
NMDevice *self = NM_DEVICE (user_data);
|
NMDevice *self = NM_DEVICE (user_data);
|
||||||
|
|
||||||
self->priv->start_timer = 0;
|
self->priv->start_timer = 0;
|
||||||
|
if (self->priv->managed)
|
||||||
nm_device_state_changed (self, NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_NOW_MANAGED);
|
nm_device_state_changed (self, NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_NOW_MANAGED);
|
||||||
|
else
|
||||||
|
nm_info ("(%s): now unmanaged", nm_device_get_iface (self));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user