NetworkManager r3369 - in trunk: . src



Author: dcbw
Date: Fri Feb 29 19:13:08 2008
New Revision: 3369
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3369&view=rev

Log:
2008-02-29  Dan Williams  <dcbw redhat com>

	* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): ensure that a previously active
			device with a system connection has a link before denying a switch
			to a user connection



Modified:
   trunk/ChangeLog
   trunk/src/NetworkManagerPolicy.c

Modified: trunk/src/NetworkManagerPolicy.c
==============================================================================
--- trunk/src/NetworkManagerPolicy.c	(original)
+++ trunk/src/NetworkManagerPolicy.c	Fri Feb 29 19:13:08 2008
@@ -316,13 +316,14 @@
 		gboolean old_user_requested = nm_act_request_get_user_requested (old_act_req);
 		gboolean old_has_link = nm_device_has_active_link (old_dev);
 
-		/* If an old device is active or being activated, and its connection is
-		 * a system connection, and the best connection is a user connection,
-		 * don't switch.
+		/* If an old device is active or being activated (and has an active link),
+		 * and its connection is a system connection, and the best connection is
+		 * a user connection, don't switch.
 		 */
 		if (   old_connection
 		    && (nm_connection_get_scope (old_connection) == NM_CONNECTION_SCOPE_SYSTEM)
-		    && (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_USER))
+		    && (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_USER)
+		    && nm_device_has_active_link (old_dev))
 			goto out;
 
 		if (   (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM)



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