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



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3369 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-02-29 19:13:08 +00:00
parent 41c09c229c
commit 2457519e90
2 changed files with 12 additions and 4 deletions

View File

@@ -1,3 +1,10 @@
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
2008-02-29 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c

View File

@@ -316,13 +316,14 @@ nm_policy_device_change_check (gpointer user_data)
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)