mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 17:40:08 +01:00
manager: use nm_device_disconnect_active_connection() in nm_manager_deactivate_connection()
We should not blindly change the device's state. Instead, call nm_device_disconnect_active_connection() which will figure out whether the device state needs to change. Note that it is very possible that the active-connection instance is still queued, not yet queued, or already disconnected. nm_device_disconnect_active_connection() does the right thing in all cases.
This commit is contained in:
parent
a0a36d55a1
commit
023ebd8eeb
1 changed files with 4 additions and 4 deletions
|
|
@ -5420,10 +5420,10 @@ nm_manager_deactivate_connection (NMManager *manager,
|
|||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
g_assert (NM_IS_ACT_REQUEST (active));
|
||||
nm_device_state_changed (nm_active_connection_get_device (active),
|
||||
NM_DEVICE_STATE_DEACTIVATING,
|
||||
reason);
|
||||
nm_assert (NM_IS_ACT_REQUEST (active));
|
||||
nm_device_disconnect_active_connection (active,
|
||||
reason,
|
||||
NM_ACTIVE_CONNECTION_STATE_REASON_UNKNOWN);
|
||||
}
|
||||
|
||||
_notify (manager, PROP_ACTIVE_CONNECTIONS);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue