2008-03-10 Dan Williams <dcbw@redhat.com>

* src/nm-device.c
		- (nm_device_bring_down): deactivate the device if it's activating too,
			not just if it's already activated.  This makes sure that everything
			from an association attempt is cleaned up (like DHCP for example)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3411 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-03-10 19:33:36 +00:00
parent be4addd6ae
commit 483b5f8ebd
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
- (nm_device_bring_down): deactivate the device if it's activating too,
not just if it's already activated. This makes sure that everything
from an association attempt is cleaned up (like DHCP for example)
2008-03-10 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c

View file

@ -1515,6 +1515,8 @@ nm_device_bring_up (NMDevice *self, gboolean wait)
void
nm_device_bring_down (NMDevice *self, gboolean wait)
{
NMDeviceState state;
g_return_if_fail (NM_IS_DEVICE (self));
if (!nm_device_is_up (self))
@ -1522,7 +1524,8 @@ nm_device_bring_down (NMDevice *self, gboolean wait)
nm_info ("Bringing down device %s", nm_device_get_iface (self));
if (nm_device_get_state (self) == NM_DEVICE_STATE_ACTIVATED)
state = nm_device_get_state (self);
if ((state == NM_DEVICE_STATE_ACTIVATED) || nm_device_is_activating (self))
nm_device_interface_deactivate (NM_DEVICE_INTERFACE (self));
if (NM_DEVICE_GET_CLASS (self)->bring_down)