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-activation-request.c | |
parent | e17c5736fc3722ce51cb33f3edb203960125a4c1 (diff) |
Imported Upstream version 0.9.8.0upstream/0.9.8.0
Diffstat (limited to 'src/nm-activation-request.c')
-rw-r--r-- | src/nm-activation-request.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index 88504ce0d..76949cf27 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -297,6 +297,7 @@ nm_act_request_add_share_rule (NMActRequest *req, static void device_state_changed (NMDevice *device, GParamSpec *pspec, NMActRequest *self) { + NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self); NMActiveConnectionState ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN; /* Set NMActiveConnection state based on the device's state */ @@ -318,6 +319,13 @@ device_state_changed (NMDevice *device, GParamSpec *pspec, NMActRequest *self) case NM_DEVICE_STATE_FAILED: case NM_DEVICE_STATE_DISCONNECTED: ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATED; + + /* No longer need to pay attention to device state */ + if (priv->device && priv->device_state_id) { + g_signal_handler_disconnect (priv->device, priv->device_state_id); + priv->device_state_id = 0; + } + g_clear_object (&priv->device); break; default: break; |