mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 12:50:09 +01:00
core: don't print carrier messages if device is unmanaged
This commit is contained in:
parent
54a0ac0e50
commit
331b6562cb
1 changed files with 8 additions and 6 deletions
|
|
@ -184,12 +184,14 @@ set_carrier (NMDeviceWired *self,
|
|||
g_object_notify (G_OBJECT (self), "carrier");
|
||||
|
||||
state = nm_device_get_state (NM_DEVICE (self));
|
||||
nm_log_info (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
|
||||
"(%s): carrier now %s (device state %d%s)",
|
||||
nm_device_get_iface (NM_DEVICE (self)),
|
||||
carrier ? "ON" : "OFF",
|
||||
state,
|
||||
defer_action ? ", deferring action for 4 seconds" : "");
|
||||
if (state >= NM_DEVICE_STATE_UNAVAILABLE) {
|
||||
nm_log_info (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)),
|
||||
"(%s): carrier now %s (device state %d%s)",
|
||||
nm_device_get_iface (NM_DEVICE (self)),
|
||||
carrier ? "ON" : "OFF",
|
||||
state,
|
||||
defer_action ? ", deferring action for 4 seconds" : "");
|
||||
}
|
||||
|
||||
if (defer_action)
|
||||
priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue