core: fix NMDevice::state-changed emission of ACTIVATED (bgo #685581)

NMPolicy was calling nm_device_state_changed() from inside its
NMDevice::state-changed handler, which caused the D-Bus signal to get
lost. Use nm_device_queue_state() instead.
This commit is contained in:
Dan Winship
2012-10-05 16:41:02 -04:00
parent 30db13ae5a
commit ba48be3a34

View File

@@ -1453,10 +1453,10 @@ device_state_changed (NMDevice *device,
/* Activate secondary (VPN) connections */
if (!activate_secondary_connections (policy, connection, device))
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED,
nm_device_queue_state (device, NM_DEVICE_STATE_FAILED,
NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED);
} else
nm_device_state_changed (device, NM_DEVICE_STATE_ACTIVATED,
nm_device_queue_state (device, NM_DEVICE_STATE_ACTIVATED,
NM_DEVICE_STATE_REASON_NONE);
break;