NetworkManager r3218 - in branches/nm-0-6-olpc: . src



Author: dcbw
Date: Wed Jan  9 15:04:52 2008
New Revision: 3218
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3218&view=rev

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

	* src/NetworkManagerPolicy.c
	  src/NetworkManagerPolicy.h
		- (nm_policy_remove_nbd_notifier): new function; remove a device from
			the no-best-device notification list

	* src/nm-device-802-11-mesh-olpc.c
		- (nm_device_802_11_mesh_olpc_dispose): ensure the mesh device removes
			itself from the no-best-device notification list



Modified:
   branches/nm-0-6-olpc/ChangeLog
   branches/nm-0-6-olpc/src/NetworkManagerPolicy.c
   branches/nm-0-6-olpc/src/NetworkManagerPolicy.h
   branches/nm-0-6-olpc/src/nm-device-802-11-mesh-olpc.c

Modified: branches/nm-0-6-olpc/src/NetworkManagerPolicy.c
==============================================================================
--- branches/nm-0-6-olpc/src/NetworkManagerPolicy.c	(original)
+++ branches/nm-0-6-olpc/src/NetworkManagerPolicy.c	Wed Jan  9 15:04:52 2008
@@ -54,6 +54,13 @@
 	nbd_notifiers = g_slist_append (nbd_notifiers, dev);
 }
 
+void nm_policy_remove_nbd_notifier (NMDevice *dev)
+{
+	g_return_if_fail (dev != NULL);
+
+	nbd_notifiers = g_slist_remove (nbd_notifiers, dev);
+}
+
 
 /*
  * nm_policy_activation_finish

Modified: branches/nm-0-6-olpc/src/NetworkManagerPolicy.h
==============================================================================
--- branches/nm-0-6-olpc/src/NetworkManagerPolicy.h	(original)
+++ branches/nm-0-6-olpc/src/NetworkManagerPolicy.h	Wed Jan  9 15:04:52 2008
@@ -40,5 +40,6 @@
 void nm_policy_schedule_deactivate (NMDevice * dev);
 
 void nm_policy_add_nbd_notifier (NMDevice *dev);
+void nm_policy_remove_nbd_notifier (NMDevice *dev);
 
 #endif

Modified: branches/nm-0-6-olpc/src/nm-device-802-11-mesh-olpc.c
==============================================================================
--- branches/nm-0-6-olpc/src/nm-device-802-11-mesh-olpc.c	(original)
+++ branches/nm-0-6-olpc/src/nm-device-802-11-mesh-olpc.c	Wed Jan  9 15:04:52 2008
@@ -2396,6 +2396,8 @@
 	g_signal_handler_disconnect (G_OBJECT (data->netlink_monitor),
 	                             self->priv->wireless_event_id);
 
+	nm_policy_remove_nbd_notifier (NM_DEVICE (self));
+
 	/* Chain up to the parent class */
 	parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass));
 	G_OBJECT_CLASS (parent_class)->dispose (object);



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