diff --git a/ChangeLog b/ChangeLog index 4ad0b60455..4e21475734 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-31 Dan Williams + + * 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 + 2008-03-31 Dan Williams * src/vpn-manager/nm-vpn-manager.c diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 3863851131..19063948d4 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -122,6 +122,10 @@ device_state_changed (NMDevice *device, NMDeviceState state, gpointer user_data) 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 @@ plugin_state_changed (DBusGProxy *proxy, 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: