From 7a5e0c7fd77ecf158a668ccf979378a7ac58438f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 8 Mar 2017 16:06:21 +0100 Subject: [PATCH] core: once activated an assumed connection make it NM_ACTIVATION_TYPE_MANAGED --- src/nm-active-connection.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 29c7334950..1cdef98cef 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -110,6 +110,8 @@ static void _device_cleanup (NMActiveConnection *self); static void _settings_connection_notify_flags (NMSettingsConnection *settings_connection, GParamSpec *param, NMActiveConnection *self); +static void _set_activation_type (NMActiveConnection *self, + NMActivationType activation_type); /*****************************************************************************/ @@ -223,6 +225,14 @@ nm_active_connection_set_state (NMActiveConnection *self, state_to_string (new_state), state_to_string (priv->state)); + if ( new_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED + && priv->activation_type == NM_ACTIVATION_TYPE_ASSUME) { + /* assuming connections mean to gracefully take over an externally + * configured device. Once activation is complete, an assumed + * activation *is* the same as a full activation. */ + _set_activation_type (self, NM_ACTIVATION_TYPE_MANAGED); + } + old_state = priv->state; priv->state = new_state; priv->state_set = TRUE;