diff options
| author | Michael Biebl <biebl@debian.org> | 2013-02-20 23:06:45 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2013-02-20 23:06:45 +0100 |
| commit | 8d275584fc94f398f0a7c990dcd057533d9a5856 (patch) | |
| tree | 1bf4a928e201222a008e6776799d174ee3223be3 /src/nm-active-connection.c | |
| parent | e17c5736fc3722ce51cb33f3edb203960125a4c1 (diff) | |
Imported Upstream version 0.9.8.0 upstream/0.9.8.0
Diffstat (limited to 'src/nm-active-connection.c')
| -rw-r--r-- | src/nm-active-connection.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 15b4b485..6e3a5da6 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -101,6 +101,10 @@ nm_active_connection_set_state (NMActiveConnection *self, if (priv->state == new_state) return; + /* DEACTIVATED is a terminal state */ + if (priv->state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) + g_return_if_fail (new_state != NM_ACTIVE_CONNECTION_STATE_DEACTIVATED); + old_state = priv->state; priv->state = new_state; g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_STATE); @@ -110,6 +114,12 @@ nm_active_connection_set_state (NMActiveConnection *self, nm_settings_connection_update_timestamp (NM_SETTINGS_CONNECTION (priv->connection), (guint64) time (NULL), TRUE); } + + if (priv->state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) { + /* Device is no longer relevant when deactivated */ + g_clear_object (&priv->device); + g_object_notify (G_OBJECT (self), NM_ACTIVE_CONNECTION_DEVICES); + } } const char * |