2008-05-13 Dan Williams <dcbw@redhat.com>
Fix refcounting issues over sleep/wake when a VPN connection was active that caused NM to try registering an object path for a device upon wake that was the same as an already registered object path. * src/nm-device.c - (nm_device_take_down): properly handle cases where the device is no longer active but was just active, and therefore must be deactivated. When a device moves to unmanaged mode, this function previously would not deactivate the device, because the state was already unmanaged by the time this function was called. * src/vpn-manager/nm-vpn-connection.c - (device_state_changed): properly handle multiple devices states in which the device is now deactivated. Code previously didn't handle transitions to the UNAVAILABLE (like rfkill or carrier off) and UNMANAGED states. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3667 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1470,12 +1470,9 @@ nm_device_bring_up (NMDevice *self, gboolean wait)
|
||||
void
|
||||
nm_device_take_down (NMDevice *self, gboolean wait)
|
||||
{
|
||||
NMDeviceState state;
|
||||
|
||||
g_return_if_fail (NM_IS_DEVICE (self));
|
||||
|
||||
state = nm_device_get_state (self);
|
||||
if ((state == NM_DEVICE_STATE_ACTIVATED) || nm_device_is_activating (self))
|
||||
if (nm_device_get_act_request (self))
|
||||
nm_device_interface_deactivate (NM_DEVICE_INTERFACE (self));
|
||||
|
||||
if (nm_device_is_up (self)) {
|
||||
|
Reference in New Issue
Block a user