NetworkManager r4040 - in trunk: . libnm-glib



Author: dcbw
Date: Fri Sep  5 15:16:29 2008
New Revision: 4040
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4040&view=rev

Log:
2008-09-05  Dan Williams  <dcbw redhat com>

	* 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



Modified:
   trunk/ChangeLog
   trunk/libnm-glib/nm-device-wifi.c

Modified: trunk/libnm-glib/nm-device-wifi.c
==============================================================================
--- trunk/libnm-glib/nm-device-wifi.c	(original)
+++ trunk/libnm-glib/nm-device-wifi.c	Fri Sep  5 15:16:29 2008
@@ -359,6 +359,16 @@
 
 	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 @@
 
 	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) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]