mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-18 11:50:29 +01:00
core: set GError on failure in nm_manager_deactivate_connection() (rh #976627)
It fixes NM crash (abort) when VPN connection can't be disconnected.
This commit is contained in:
parent
0652d9c596
commit
a6f28f402b
1 changed files with 3 additions and 0 deletions
|
|
@ -3220,6 +3220,9 @@ nm_manager_deactivate_connection (NMManager *manager,
|
|||
vpn_reason = NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED;
|
||||
if (nm_vpn_manager_deactivate_connection (priv->vpn_manager, NM_VPN_CONNECTION (active), vpn_reason))
|
||||
success = TRUE;
|
||||
else
|
||||
g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE,
|
||||
"The VPN connection was not active.");
|
||||
} else {
|
||||
g_assert (NM_IS_ACT_REQUEST (active));
|
||||
/* FIXME: use DEACTIVATING state */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue