NetworkManager r3520 - in trunk: . src/vpn-manager



Author: dcbw
Date: Mon Mar 31 15:50:18 2008
New Revision: 3520
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3520&view=rev

Log:
2008-03-31  Dan Williams  <dcbw redhat com>

	* src/vpn-manager/nm-vpn-connection.c
		- (device_state_changed): send correct state on device failure too
		- (plugin_state_changed): failed state means unexpected disconnection,
			thus if the service goes away while the VPN connection is activated
			that's a failure too



Modified:
   trunk/ChangeLog
   trunk/src/vpn-manager/nm-vpn-connection.c

Modified: trunk/src/vpn-manager/nm-vpn-connection.c
==============================================================================
--- trunk/src/vpn-manager/nm-vpn-connection.c	(original)
+++ trunk/src/vpn-manager/nm-vpn-connection.c	Mon Mar 31 15:50:18 2008
@@ -122,6 +122,10 @@
 		nm_vpn_connection_set_state (connection,
 		                             NM_VPN_CONNECTION_STATE_DISCONNECTED,
 		                             NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED);
+	} else if (state == NM_DEVICE_STATE_FAILED) {
+		nm_vpn_connection_set_state (connection,
+		                             NM_VPN_CONNECTION_STATE_FAILED,
+		                             NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED);
 	}
 }
 
@@ -191,13 +195,9 @@
 	case NM_VPN_CONNECTION_STATE_NEED_AUTH:
 	case NM_VPN_CONNECTION_STATE_CONNECT:
 	case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
-		nm_vpn_connection_set_state (connection,
-		                             NM_VPN_CONNECTION_STATE_FAILED,
-		                             NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED);
-		break;
 	case NM_VPN_CONNECTION_STATE_ACTIVATED:
 		nm_vpn_connection_set_state (connection,
-		                             NM_VPN_CONNECTION_STATE_DISCONNECTED,
+		                             NM_VPN_CONNECTION_STATE_FAILED,
 		                             NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED);
 		break;
 	default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]