From a5a782991f077b33388cf1d0a2ced631dc10d155 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 5 Sep 2008 15:16:29 +0000 Subject: [PATCH] 2008-09-05 Dan Williams * libnm-glib/nm-device-wifi.c - (access_point_removed_proxy): clean up the active access point too just in case the active ap changed signal didn't come through yet - (clean_up_aps): be sure to set priv->active_ap to NULL when cleaning up git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4040 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 7 +++++++ libnm-glib/nm-device-wifi.c | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 14f8310e38..70e7c086c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-05 Dan Williams + + * libnm-glib/nm-device-wifi.c + - (access_point_removed_proxy): clean up the active access point too + just in case the active ap changed signal didn't come through yet + - (clean_up_aps): be sure to set priv->active_ap to NULL when cleaning up + 2008-09-05 Dan Williams * libnm-glib/nm-client.c diff --git a/libnm-glib/nm-device-wifi.c b/libnm-glib/nm-device-wifi.c index 7359749e48..2e6183f3f8 100644 --- a/libnm-glib/nm-device-wifi.c +++ b/libnm-glib/nm-device-wifi.c @@ -359,6 +359,16 @@ access_point_removed_proxy (DBusGProxy *proxy, char *path, gpointer user_data) ap = nm_device_wifi_get_access_point_by_path (self, path); if (ap) { + if (ap == priv->active_ap) { + g_object_unref (priv->active_ap); + priv->active_ap = NULL; + priv->null_active_ap = FALSE; + + _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT); + priv->rate = 0; + _nm_object_queue_notify (NM_OBJECT (self), NM_DEVICE_WIFI_BITRATE); + } + g_signal_emit (self, signals[ACCESS_POINT_REMOVED], 0, ap); g_ptr_array_remove (priv->aps, ap); g_object_unref (G_OBJECT (ap)); @@ -374,8 +384,10 @@ clean_up_aps (NMDeviceWifi *self, gboolean notify) priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - if (priv->active_ap) + if (priv->active_ap) { g_object_unref (priv->active_ap); + priv->active_ap = NULL; + } if (priv->aps) { while (priv->aps->len) {