mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 08:28:05 +02:00
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:
parent
43395ebab6
commit
5d1d4d185e
2 changed files with 15 additions and 4 deletions
|
|
@ -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>
|
2008-01-13 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* libnm-glib/nm-device-802-11-wireless.c
|
* libnm-glib/nm-device-802-11-wireless.c
|
||||||
|
|
|
||||||
|
|
@ -1163,7 +1163,7 @@ nm_manager_get_device_by_udi (NMManager *manager, const char *udi)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
check_connection_allowed (NMManager *manager,
|
check_connection_allowed (NMManager *manager,
|
||||||
NMDevice *device,
|
NMDeviceInterface *dev_iface,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *specific_object,
|
const char *specific_object,
|
||||||
GError **error)
|
GError **error)
|
||||||
|
|
@ -1183,7 +1183,7 @@ check_connection_allowed (NMManager *manager,
|
||||||
if (connection == system_connection)
|
if (connection == system_connection)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (nm_device_interface_check_connection_conflicts (NM_DEVICE_INTERFACE (device),
|
if (nm_device_interface_check_connection_conflicts (dev_iface,
|
||||||
connection,
|
connection,
|
||||||
system_connection)) {
|
system_connection)) {
|
||||||
allowed = FALSE;
|
allowed = FALSE;
|
||||||
|
|
@ -1205,18 +1205,21 @@ nm_manager_activate_device (NMManager *manager,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
NMActRequest *req;
|
NMActRequest *req;
|
||||||
|
NMDeviceInterface *dev_iface;
|
||||||
gboolean success;
|
gboolean success;
|
||||||
|
|
||||||
g_return_val_if_fail (NM_IS_MANAGER (manager), FALSE);
|
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_DEVICE (device), FALSE);
|
||||||
g_return_val_if_fail (NM_IS_CONNECTION (connection), 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 */
|
/* 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;
|
return FALSE;
|
||||||
|
|
||||||
req = nm_act_request_new (connection, specific_object, user_requested);
|
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);
|
g_object_unref (req);
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue