diff options
| author | Michael Biebl <biebl@debian.org> | 2018-03-13 01:29:54 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-03-13 01:29:54 +0100 |
| commit | 7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (patch) | |
| tree | e48e88b177182607488bcfd2d2645dbc77276866 /src/nm-active-connection.c | |
| parent | 50f6b47074e01dffb8dc536c0a20961dcf28ae9b (diff) | |
New upstream version 1.10.6 upstream/1.10.6
Diffstat (limited to 'src/nm-active-connection.c')
| -rw-r--r-- | src/nm-active-connection.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 2286a74b..65f57565 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -292,6 +292,36 @@ nm_active_connection_set_state (NMActiveConnection *self, } } +void +nm_active_connection_set_state_fail (NMActiveConnection *self, + NMActiveConnectionStateReason reason, + const char *error_desc) +{ + NMActiveConnectionState s; + + g_return_if_fail (NM_IS_ACTIVE_CONNECTION (self)); + + if (error_desc) { + _LOGD ("Failed to activate '%s': %s", + nm_active_connection_get_settings_connection_id (self), + error_desc); + } + + s = nm_active_connection_get_state (self); + if ( s >= NM_ACTIVE_CONNECTION_STATE_ACTIVATING + && s < NM_ACTIVE_CONNECTION_STATE_DEACTIVATING) { + nm_active_connection_set_state (self, + NM_ACTIVE_CONNECTION_STATE_DEACTIVATING, + reason); + s = nm_active_connection_get_state (self); + } + if (s < NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) { + nm_active_connection_set_state (self, + NM_ACTIVE_CONNECTION_STATE_DEACTIVATED, + reason); + } +} + NMActivationStateFlags nm_active_connection_get_state_flags (NMActiveConnection *self) { @@ -1236,6 +1266,7 @@ set_property (GObject *object, guint prop_id, nm_active_connection_set_device (self, g_value_get_object (value)); break; case PROP_INT_SUBJECT: + /* construct-only */ priv->subject = g_value_dup_object (value); break; case PROP_INT_MASTER: @@ -1251,6 +1282,7 @@ set_property (GObject *object, guint prop_id, _set_activation_type (self, (NMActivationType) i); break; case PROP_SPECIFIC_OBJECT: + /* construct-only */ tmp = g_value_get_string (value); /* NM uses "/" to mean NULL */ if (g_strcmp0 (tmp, "/") != 0) @@ -1263,6 +1295,7 @@ set_property (GObject *object, guint prop_id, priv->is_default6 = g_value_get_boolean (value); break; case PROP_VPN: + /* construct-only */ priv->vpn = g_value_get_boolean (value); break; case PROP_MASTER: |