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:
@@ -1453,10 +1453,10 @@ device_state_changed (NMDevice *device,
|
|||||||
|
|
||||||
/* Activate secondary (VPN) connections */
|
/* Activate secondary (VPN) connections */
|
||||||
if (!activate_secondary_connections (policy, connection, device))
|
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);
|
NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED);
|
||||||
} else
|
} else
|
||||||
nm_device_state_changed (device, NM_DEVICE_STATE_ACTIVATED,
|
nm_device_queue_state (device, NM_DEVICE_STATE_ACTIVATED,
|
||||||
NM_DEVICE_STATE_REASON_NONE);
|
NM_DEVICE_STATE_REASON_NONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user