NetworkManager r3666 - in trunk: . src



Author: dcbw
Date: Wed May 14 01:55:49 2008
New Revision: 3666
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3666&view=rev

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

	* src/nm-device-private.h
	  src/nm-device.c
		- (nm_device_hw_bring_up, nm_device_hw_take_down): export

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_set_enabled): take devices up
			and down as appropriate for the rfkill state



Modified:
   trunk/ChangeLog
   trunk/src/nm-device-802-11-wireless.c
   trunk/src/nm-device-private.h
   trunk/src/nm-device.c

Modified: trunk/src/nm-device-802-11-wireless.c
==============================================================================
--- trunk/src/nm-device-802-11-wireless.c	(original)
+++ trunk/src/nm-device-802-11-wireless.c	Wed May 14 01:55:49 2008
@@ -3306,10 +3306,13 @@
 
 	state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
 	if (state >= NM_DEVICE_STATE_UNAVAILABLE) {
-		if (enabled)
+		if (enabled) {
+			nm_device_hw_bring_up (NM_DEVICE (self), TRUE);
 			nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED);
-		else
+		} else {
 			nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE);
+			nm_device_hw_take_down (NM_DEVICE (self), TRUE);
+		}
 	}
 }
 

Modified: trunk/src/nm-device-private.h
==============================================================================
--- trunk/src/nm-device-private.h	(original)
+++ trunk/src/nm-device-private.h	Wed May 14 01:55:49 2008
@@ -33,4 +33,8 @@
 
 void			nm_device_state_changed (NMDevice *device, NMDeviceState state);
 
+gboolean nm_device_hw_bring_up (NMDevice *self, gboolean wait);
+
+void nm_device_hw_take_down (NMDevice *self, gboolean wait);
+
 #endif	/* NM_DEVICE_PRIVATE_H */

Modified: trunk/src/nm-device.c
==============================================================================
--- trunk/src/nm-device.c	(original)
+++ trunk/src/nm-device.c	Wed May 14 01:55:49 2008
@@ -1386,7 +1386,7 @@
 	return TRUE;
 }
 
-static gboolean
+gboolean
 nm_device_hw_bring_up (NMDevice *self, gboolean wait)
 {
 	gboolean success;
@@ -1423,7 +1423,7 @@
 	return TRUE;
 }
 
-static void
+void
 nm_device_hw_take_down (NMDevice *self, gboolean wait)
 {
 	guint32 tries = 0;



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