2005-05-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c - (device_stop_and_free): Deactivate VPN connections before deactivating devices, fixes a deadlock on shutdown with a VPN connection active. This function locks the device list, as does nm_get_active_device() which is called from nm_vpn_manager_deactivate_vpn_connection(). git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@628 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2005-05-14 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/NetworkManager.c
|
||||||
|
- (device_stop_and_free): Deactivate VPN connections before deactivating devices,
|
||||||
|
fixes a deadlock on shutdown with a VPN connection active. This function locks
|
||||||
|
the device list, as does nm_get_active_device() which is called from
|
||||||
|
nm_vpn_manager_deactivate_vpn_connection().
|
||||||
|
|
||||||
2005-05-14 Dan Williams <dcbw@redhat.com>
|
2005-05-14 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* NetworkManager.h
|
* NetworkManager.h
|
||||||
|
@@ -446,7 +446,7 @@ static NMData *nm_data_new (gboolean enable_test_devices)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void device_stop_and_free (NMDevice *dev, gpointer user_data)
|
static void device_stop_and_free (NMDevice *dev, gpointer user_data)
|
||||||
{
|
{
|
||||||
g_return_if_fail (dev != NULL);
|
g_return_if_fail (dev != NULL);
|
||||||
|
|
||||||
@@ -466,6 +466,10 @@ static void nm_data_free (NMData *data)
|
|||||||
{
|
{
|
||||||
g_return_if_fail (data != NULL);
|
g_return_if_fail (data != NULL);
|
||||||
|
|
||||||
|
/* Kill any active VPN connection */
|
||||||
|
if (nm_vpn_manager_get_active_vpn_connection (data->vpn_manager))
|
||||||
|
nm_vpn_manager_deactivate_vpn_connection (data->vpn_manager);
|
||||||
|
|
||||||
/* Stop and destroy all devices */
|
/* Stop and destroy all devices */
|
||||||
nm_lock_mutex (data->dev_list_mutex, __FUNCTION__);
|
nm_lock_mutex (data->dev_list_mutex, __FUNCTION__);
|
||||||
g_slist_foreach (data->dev_list, (GFunc) device_stop_and_free, NULL);
|
g_slist_foreach (data->dev_list, (GFunc) device_stop_and_free, NULL);
|
||||||
|
Reference in New Issue
Block a user