mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 04:10:14 +01:00
core: transit to DISCONNECTING state for NMActiveConnection
Don't just directly switch to DISCONNECTED state. If we are ACTIVATING
or ACTIVATED, first transition to DISCONNECTING state.
(cherry picked from commit 6d623825f6)
This commit is contained in:
parent
5769d357c7
commit
ff380c37bb
2 changed files with 9 additions and 9 deletions
|
|
@ -9879,9 +9879,9 @@ static void
|
|||
_clear_queued_act_request (NMDevicePrivate *priv)
|
||||
{
|
||||
if (priv->queued_act_request) {
|
||||
nm_active_connection_set_state ((NMActiveConnection *) priv->queued_act_request,
|
||||
NM_ACTIVE_CONNECTION_STATE_DEACTIVATED,
|
||||
NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED);
|
||||
nm_active_connection_set_state_fail ((NMActiveConnection *) priv->queued_act_request,
|
||||
NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED,
|
||||
NULL);
|
||||
g_clear_object (&priv->queued_act_request);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3592,9 +3592,9 @@ active_connection_parent_active (NMActiveConnection *active,
|
|||
if (!parent_ac) {
|
||||
_LOGW (LOGD_CORE, "The parent connection device '%s' depended on disappeared.",
|
||||
nm_device_get_iface (device));
|
||||
nm_active_connection_set_state (active,
|
||||
NM_ACTIVE_CONNECTION_STATE_DEACTIVATED,
|
||||
NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REMOVED);
|
||||
nm_active_connection_set_state_fail (active,
|
||||
NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REMOVED,
|
||||
"parent device disappeared");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3604,9 +3604,9 @@ active_connection_parent_active (NMActiveConnection *active,
|
|||
if (!nm_device_create_and_realize (device, (NMConnection *) connection, parent, &error)) {
|
||||
_LOGW (LOGD_CORE, "Could not realize device '%s': %s",
|
||||
nm_device_get_iface (device), error->message);
|
||||
nm_active_connection_set_state (active,
|
||||
NM_ACTIVE_CONNECTION_STATE_DEACTIVATED,
|
||||
NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REALIZE_FAILED);
|
||||
nm_active_connection_set_state_fail (active,
|
||||
NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_REALIZE_FAILED,
|
||||
"failure to realize device");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue