summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2014-02-27 13:31:51 +0100
committerJiří Klimeš <jklimes@redhat.com>2014-02-27 13:31:51 +0100
commitb374fff89179844a00b534d18a84279181cad505 (patch)
treed123cd1f1702eb5ea5882aec58bce71bc993b933
parentf0a8b3a76d2e374baf8751885973def451bc2049 (diff)
downloadNetworkManager-jk/acon-remove-fix.tar.gz
core: only ignore device changes when device activation request is not NULLjk/acon-remove-fix
When device went NM_DEVICE_STATE_DEACTIVATING -> NM_DEVICE_STATE_DEACTIVATED, activation request of the device had already been set to NULL. But we need to proceed so that active connection also moved from DEACTIVATING to DEACTIVATED and could be removed. Without that the active connection would stuck in deactivating state forever. See e19f48ec2601a37641cfbcd4cc4b0c63b407c7a2
-rw-r--r--src/nm-activation-request.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c
index 7ffa3dc6f5..6a1d5c9dbf 100644
--- a/src/nm-activation-request.c
+++ b/src/nm-activation-request.c
@@ -306,9 +306,10 @@ device_state_changed (NMActiveConnection *active,
NMDeviceState old_state)
{
NMActiveConnectionState ac_state = NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
+ NMActiveConnection *act_req_ac = NM_ACTIVE_CONNECTION (nm_device_get_act_request (device));
/* Ignore state changes when this activation request is not yet active */
- if (NM_ACTIVE_CONNECTION (nm_device_get_act_request (device)) != active)
+ if (act_req_ac != NULL && act_req_ac != active)
return;
/* Set NMActiveConnection state based on the device's state */