2007-08-15 Dan Williams <dcbw@redhat.com>

* src/nm-device-802-11-wireless.c
		- (real_bring_down): move most of this function into device_cleanup()
			so that it can be called from elsewhere
		- (nm_device_802_11_wireless_dispose): clean up device periodic timers
			and stuff on dispose.  These would normally get cleaned up when
			the device is marked down and deactivated, but when the device is
			hot-unplugged, it's already down and real_down() never gets run



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2698 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2007-08-15 18:52:23 +00:00
parent cf24e61f74
commit 6f57387033
2 changed files with 23 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2007-08-15 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
- (real_bring_down): move most of this function into device_cleanup()
so that it can be called from elsewhere
- (nm_device_802_11_wireless_dispose): clean up device periodic timers
and stuff on dispose. These would normally get cleaned up when
the device is marked down and deactivated, but when the device is
hot-unplugged, it's already down and real_down() never gets run
2007-08-15 Dan Williams <dcbw@redhat.com>
* src/nm-dbus-nmi.c

View file

@ -186,6 +186,8 @@ static void supplicant_mgr_state_cb (NMSupplicantInterface * iface,
static void cleanup_supplicant_interface (NMDevice80211Wireless * self);
static void device_cleanup (NMDevice80211Wireless *self);
static void
network_added (NMDevice80211Wireless *device, NMAccessPoint *ap)
@ -592,9 +594,8 @@ real_bring_up (NMDevice *dev)
}
static void
real_bring_down (NMDevice *dev)
device_cleanup (NMDevice80211Wireless *self)
{
NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
if (priv->periodic_source_id) {
@ -622,6 +623,14 @@ real_bring_down (NMDevice *dev)
}
}
static void
real_bring_down (NMDevice *dev)
{
NMDevice80211Wireless *self = NM_DEVICE_802_11_WIRELESS (dev);
device_cleanup (self);
}
static void
real_deactivate_quickly (NMDevice *dev)
{
@ -3024,6 +3033,8 @@ nm_device_802_11_wireless_dispose (GObject *object)
if (priv->ap_list)
nm_ap_list_unref (priv->ap_list);
device_cleanup (self);
G_OBJECT_CLASS (nm_device_802_11_wireless_parent_class)->dispose (object);
}