From e7567859c9263acd068340358f53fac69db17b21 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 6 Nov 2013 22:24:57 -0600 Subject: [PATCH] core: allow devices to activate their generated connections If the device has a valid generated connection, it's already applied and the device is already "activated" outside NM, so let activation happen inside NM regardless of whether the device is available or not according to NM. --- src/devices/nm-device.c | 2 -- src/nm-manager.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index d836ab0e0e..eca1dfb3aa 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4613,8 +4613,6 @@ nm_device_activate (NMDevice *self, NMActRequest *req) NM_DEVICE_STATE_REASON_NOW_MANAGED); } - g_assert (nm_device_connection_is_available (self, connection)); - priv->act_request = g_object_ref (req); g_object_notify (G_OBJECT (self), NM_DEVICE_ACTIVE_CONNECTION); diff --git a/src/nm-manager.c b/src/nm-manager.c index 3bd5e97d36..552e2d6d12 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1940,9 +1940,7 @@ add_device (NMManager *self, NMDevice *device, gboolean nm_created) system_create_virtual_devices (self); /* If the device has a connection it can assume, do that now */ - if ( connection - && nm_device_is_available (device) - && nm_device_connection_is_available (device, connection)) { + if (connection) { NMActiveConnection *active; NMAuthSubject *subject; GError *error = NULL;