mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 02:50:17 +01:00
core: use correct device state for supplicant link timeouts
When something fails while activated, the device should move to the FAILED state, not directly to DISCONNECTED.
This commit is contained in:
parent
cfae0b79ba
commit
92de1202a0
2 changed files with 8 additions and 4 deletions
|
|
@ -753,8 +753,9 @@ link_timeout_cb (gpointer user_data)
|
|||
req = nm_device_get_act_request (dev);
|
||||
|
||||
if (nm_device_get_state (dev) == NM_DEVICE_STATE_ACTIVATED) {
|
||||
nm_device_state_changed (dev, NM_DEVICE_STATE_DISCONNECTED,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT);
|
||||
nm_device_state_changed (dev,
|
||||
NM_DEVICE_STATE_FAILED,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2071,8 +2071,11 @@ link_timeout_cb (gpointer user_data)
|
|||
* to reassociate within the timeout period, so the connection must
|
||||
* fail.
|
||||
*/
|
||||
if (nm_device_get_state (dev) == NM_DEVICE_STATE_ACTIVATED)
|
||||
nm_device_state_changed (dev, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT);
|
||||
if (nm_device_get_state (dev) == NM_DEVICE_STATE_ACTIVATED) {
|
||||
nm_device_state_changed (dev,
|
||||
NM_DEVICE_STATE_FAILED,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue