mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 08:20:08 +01:00
device: queuing two transitions to the same state is not an error
Just ignore this, since it happens in the current code and is harmless. While we're here, improve the warning in the case where it does occur to say whiich state we're overwriting. This should help debug any future cases.
This commit is contained in:
parent
c77c566983
commit
c1d3d3f2e9
1 changed files with 8 additions and 3 deletions
|
|
@ -5587,7 +5587,12 @@ nm_device_queue_state (NMDevice *self,
|
|||
|
||||
/* We should only ever have one delayed state transition at a time */
|
||||
if (priv->queued_state.id) {
|
||||
g_warn_if_fail (priv->queued_state.id == 0);
|
||||
if (priv->queued_state.state == state)
|
||||
return;
|
||||
nm_log_warn (LOGD_DEVICE, "(%s): overwriting previously queued state change to %s (%s)",
|
||||
nm_device_get_iface (self),
|
||||
state_to_string (priv->queued_state.state),
|
||||
reason_to_string (priv->queued_state.reason));
|
||||
nm_device_queued_state_clear (self);
|
||||
}
|
||||
|
||||
|
|
@ -5595,8 +5600,8 @@ nm_device_queue_state (NMDevice *self,
|
|||
priv->queued_state.reason = reason;
|
||||
priv->queued_state.id = g_idle_add (queued_set_state, self);
|
||||
|
||||
nm_log_dbg (LOGD_DEVICE, "(%s): queued state change to %s (id %d)",
|
||||
nm_device_get_iface (self), state_to_string (state),
|
||||
nm_log_dbg (LOGD_DEVICE, "(%s): queued state change to %s due to %s (id %d)",
|
||||
nm_device_get_iface (self), state_to_string (state), reason_to_string (reason),
|
||||
priv->queued_state.id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue