2008-02-20 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): get scope off the connection, not
			using the manager helper

	* src/nm-manager.c
	  src/nm-manager.h
		- (get_scope_for_proxy): rename from get_type_for_proxy()
		- (connection_get_settings_cb): set scope and path on connection, not
			using GObject data items
		- (get_connection_for_proxy): don't need to return path, since that
			can be gotten from the connection
		- (get_connection_for_proxy): get path off the connection, not from
			parameters
		- (connection_removed_cb, connection_updated_cb): don't need to get
			path from get_connection_for_proxy(); get scope off the connection
			instead of using GObject data items
		- (connection_added_default_handler, add_one_connection_element): use
			nm_connection_get_path() not nm_manager_get_connection_dbus_path()
		- (nm_manager_get_connection_dbus_path): remove
		- (nm_manager_get_connection_scope): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3335 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-02-21 03:04:18 +00:00
parent fd0ab916c8
commit f53230715e
4 changed files with 56 additions and 84 deletions

View File

@@ -321,12 +321,12 @@ nm_policy_device_change_check (gpointer user_data)
* don't switch.
*/
if ( old_connection
&& (nm_manager_get_connection_scope (old_connection) == NM_CONNECTION_SCOPE_SYSTEM)
&& (nm_manager_get_connection_scope (connection) == NM_CONNECTION_SCOPE_USER))
&& (nm_connection_get_scope (old_connection) == NM_CONNECTION_SCOPE_SYSTEM)
&& (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_USER))
goto out;
if ( (nm_manager_get_connection_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM)
&& (nm_manager_get_connection_scope (old_connection) == NM_CONNECTION_SCOPE_USER)) {
if ( (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM)
&& (nm_connection_get_scope (old_connection) == NM_CONNECTION_SCOPE_USER)) {
do_switch = TRUE;
nm_info ("SWITCH: found system connection '%s (%s)', overrides"
" current connection '%s (%s)'.",