2008-01-17 Dan Williams <dcbw@redhat.com>

* src/nm-manager.c
		- (check_connection_allowed): take an NMDeviceInterface instead of
			an NMDevice object as an argument
		- (nm_manager_activate_device): pass an NMDeviceInterface to
			check_connection_allowed()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3241 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-01-18 02:54:55 +00:00
parent 43395ebab6
commit 5d1d4d185e
2 changed files with 15 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2008-01-17 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
- (check_connection_allowed): take an NMDeviceInterface instead of
an NMDevice object as an argument
- (nm_manager_activate_device): pass an NMDeviceInterface to
check_connection_allowed()
2008-01-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c

View file

@ -1163,7 +1163,7 @@ nm_manager_get_device_by_udi (NMManager *manager, const char *udi)
static gboolean
check_connection_allowed (NMManager *manager,
NMDevice *device,
NMDeviceInterface *dev_iface,
NMConnection *connection,
const char *specific_object,
GError **error)
@ -1183,7 +1183,7 @@ check_connection_allowed (NMManager *manager,
if (connection == system_connection)
continue;
if (nm_device_interface_check_connection_conflicts (NM_DEVICE_INTERFACE (device),
if (nm_device_interface_check_connection_conflicts (dev_iface,
connection,
system_connection)) {
allowed = FALSE;
@ -1205,18 +1205,21 @@ nm_manager_activate_device (NMManager *manager,
GError **error)
{
NMActRequest *req;
NMDeviceInterface *dev_iface;
gboolean success;
g_return_val_if_fail (NM_IS_MANAGER (manager), FALSE);
g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
dev_iface = NM_DEVICE_INTERFACE (device);
/* Ensure the requested connection is allowed to be activated */
if (!check_connection_allowed (manager, device, connection, specific_object, error))
if (!check_connection_allowed (manager, dev_iface, connection, specific_object, error))
return FALSE;
req = nm_act_request_new (connection, specific_object, user_requested);
success = nm_device_interface_activate (NM_DEVICE_INTERFACE (device), req, error);
success = nm_device_interface_activate (dev_iface, req, error);
g_object_unref (req);
return success;