mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 20:10:10 +01:00
modem: ensure radio disable cleans up during activation too
Instead of just when activated.
This commit is contained in:
parent
92de1202a0
commit
0e801e5ca3
1 changed files with 5 additions and 4 deletions
|
|
@ -311,11 +311,12 @@ real_set_enabled (NMDevice *device, gboolean enabled)
|
|||
nm_modem_set_mm_enabled (priv->modem, enabled);
|
||||
|
||||
if (enabled == FALSE) {
|
||||
state = nm_device_get_state (NM_DEVICE (device));
|
||||
if (state == NM_DEVICE_STATE_ACTIVATED) {
|
||||
nm_device_state_changed (NM_DEVICE (device),
|
||||
state = nm_device_get_state (device);
|
||||
if (nm_device_is_activating (device) || state == NM_DEVICE_STATE_ACTIVATED) {
|
||||
/* user-initiated action, hence DISCONNECTED not FAILED */
|
||||
nm_device_state_changed (device,
|
||||
NM_DEVICE_STATE_DISCONNECTED,
|
||||
NM_DEVICE_STATE_REASON_NONE);
|
||||
NM_DEVICE_STATE_REASON_USER_REQUESTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue