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:
Jiří Klimeš 2013-06-28 14:04:29 +02:00
parent 0652d9c596
commit a6f28f402b

View file

@ -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 */