From 8d275584fc94f398f0a7c990dcd057533d9a5856 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 20 Feb 2013 23:06:45 +0100 Subject: Imported Upstream version 0.9.8.0 --- src/nm-activation-request.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nm-activation-request.c') 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; -- cgit v1.2.3