[PATCH] Bring interface back up upon wake



Some devices need to be up to be able to detect link. The sleep function
brings interfaces down but the wake function doesn't bring them back up.

Signed-off-by: Pierre Ossman <drzeus drzeus cx>
--- NetworkManager-0.4.orig/src/nm-dbus-nm.c	2005-06-30 02:29:36.000000000 +0200
+++ NetworkManager-0.4/src/nm-dbus-nm.c	2005-07-04 20:42:39.000000000 +0200
@@ -433,6 +433,16 @@ static DBusMessage *nm_dbus_nm_wake (DBu
 	{
 		app_data->asleep = FALSE;

+		/* Have to bring the device up before checking link status and other stuff */
+		nm_lock_mutex (app_data->dev_list_mutex, __FUNCTION__);
+		for (elt = app_data->dev_list; elt; elt = g_slist_next (elt))
+		{
+			NMDevice	*dev = (NMDevice *)(elt->data);
+
+			nm_device_bring_up (dev);
+		}
+		nm_unlock_mutex (app_data->dev_list_mutex, __FUNCTION__);
+
 		nm_schedule_state_change_signal_broadcast (app_data);
 		nm_policy_schedule_device_change_check (data->data);
 	}


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