2006-02-28 Dan Williams <dcbw@redhat.com>

* src/vpn-manager/nm-vpn-act-request.[ch]
		- (nm_vpn_act_request_is_activated): don't use a switch/case for
			just one value
		- (nm_vpn_act_request_is_failed): new function; return whether or
			not the vpn activation request has failed

	* src/vpn-manager/nm-vpn-manager.c
		- (nm_vpn_manager_deactivate_vpn_connection): tell the vpn service
			daemon to kill the connection when the activation request fails.
			Fixes issue where NM would get confused if the VPN activation
			request timed out, and would not allow further VPN connections
			on that service.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1530 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2006-03-01 04:12:35 +00:00
parent 15a6f01743
commit a282f30842
4 changed files with 27 additions and 14 deletions

View file

@ -1,3 +1,18 @@
2006-02-28 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-act-request.[ch]
- (nm_vpn_act_request_is_activated): don't use a switch/case for
just one value
- (nm_vpn_act_request_is_failed): new function; return whether or
not the vpn activation request has failed
* src/vpn-manager/nm-vpn-manager.c
- (nm_vpn_manager_deactivate_vpn_connection): tell the vpn service
daemon to kill the connection when the activation request fails.
Fixes issue where NM would get confused if the VPN activation
request timed out, and would not allow further VPN connections
on that service.
2006-02-28 Dan Williams <dcbw@redhat.com>
* gnome/applet/applet.c

View file

@ -135,21 +135,16 @@ gboolean nm_vpn_act_request_is_activating (NMVPNActRequest *req)
gboolean nm_vpn_act_request_is_activated (NMVPNActRequest *req)
{
gboolean activated = FALSE;
g_return_val_if_fail (req != NULL, FALSE);
return (req->stage == NM_VPN_ACT_STAGE_ACTIVATED) ? TRUE : FALSE;
}
switch (req->stage)
{
case NM_VPN_ACT_STAGE_ACTIVATED:
activated = TRUE;
break;
default:
break;
}
return activated;
gboolean nm_vpn_act_request_is_failed (NMVPNActRequest *req)
{
g_return_val_if_fail (req != NULL, FALSE);
return (req->stage == NM_VPN_ACT_STAGE_FAILED) ? TRUE : FALSE;
}
NMVPNManager *nm_vpn_act_request_get_manager (NMVPNActRequest *req)

View file

@ -36,6 +36,7 @@ void nm_vpn_act_request_unref (NMVPNActRequest *req);
gboolean nm_vpn_act_request_is_activating (NMVPNActRequest *req);
gboolean nm_vpn_act_request_is_activated (NMVPNActRequest *req);
gboolean nm_vpn_act_request_is_failed (NMVPNActRequest *req);
NMVPNManager * nm_vpn_act_request_get_manager (NMVPNActRequest *req);
NMVPNService * nm_vpn_act_request_get_service (NMVPNActRequest *req);

View file

@ -384,7 +384,9 @@ void nm_vpn_manager_deactivate_vpn_connection (NMVPNManager *manager, NMDevice *
if (!manager->act_req || (dev != nm_vpn_act_request_get_parent_dev (manager->act_req)))
return;
if (nm_vpn_act_request_is_activating (manager->act_req) || nm_vpn_act_request_is_activated (manager->act_req))
if (nm_vpn_act_request_is_activating (manager->act_req)
|| nm_vpn_act_request_is_activated (manager->act_req)
|| nm_vpn_act_request_is_failed (manager->act_req))
{
if (nm_vpn_act_request_is_activated (manager->act_req))
{