mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-28 13:00:34 +01:00
core: emit NMDeviceWired carrier change after logging it
Less confusing in the logs to see the change logged before listeners have a chance to emit other log messages that may depend on the new carrier state.
This commit is contained in:
parent
aa8aeb197f
commit
d4f5c40abe
1 changed files with 2 additions and 1 deletions
|
|
@ -185,7 +185,6 @@ set_carrier (NMDeviceWired *self,
|
|||
g_return_if_fail (caps & NM_DEVICE_CAP_CARRIER_DETECT);
|
||||
|
||||
priv->carrier = carrier;
|
||||
g_object_notify (G_OBJECT (self), "carrier");
|
||||
|
||||
state = nm_device_get_state (NM_DEVICE (self));
|
||||
if (state >= NM_DEVICE_STATE_UNAVAILABLE) {
|
||||
|
|
@ -197,6 +196,8 @@ set_carrier (NMDeviceWired *self,
|
|||
defer_action ? ", deferring action for 4 seconds" : "");
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (self), "carrier");
|
||||
|
||||
if (defer_action)
|
||||
priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue