From 2457519e9061d27856fcbeb08c5ce1dd3bbbe07a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 29 Feb 2008 19:13:08 +0000 Subject: [PATCH] 2008-02-29 Dan Williams * 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 --- ChangeLog | 7 +++++++ src/NetworkManagerPolicy.c | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecfa66bd23..0cc79c66d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-29 Dan Williams + + * 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 * src/nm-device-802-11-wireless.c diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c index 982877b9a1..7f16de7bf2 100644 --- a/src/NetworkManagerPolicy.c +++ b/src/NetworkManagerPolicy.c @@ -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)