mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 14:50:24 +01:00
core: actually emit reason for device state changes
Found by 代尔欣 <daierxin@gmail.com>
This commit is contained in:
parent
b4767a5c1f
commit
027ef78682
1 changed files with 4 additions and 2 deletions
|
|
@ -2404,7 +2404,9 @@ nm_device_state_changed (NMDevice *device,
|
|||
|
||||
old_state = priv->state;
|
||||
priv->state = state;
|
||||
nm_info ("(%s): device state change: %d -> %d", nm_device_get_iface (device), old_state, state);
|
||||
|
||||
nm_info ("(%s): device state change: %d -> %d (reason %d)",
|
||||
nm_device_get_iface (device), old_state, state, reason);
|
||||
|
||||
if (priv->failed_to_disconnected_id) {
|
||||
g_source_remove (priv->failed_to_disconnected_id);
|
||||
|
|
@ -2438,7 +2440,7 @@ nm_info ("(%s): device state change: %d -> %d", nm_device_get_iface (device), ol
|
|||
}
|
||||
|
||||
g_object_notify (G_OBJECT (device), NM_DEVICE_INTERFACE_STATE);
|
||||
g_signal_emit_by_name (device, "state-changed", state, old_state, 0);
|
||||
g_signal_emit_by_name (device, "state-changed", state, old_state, reason);
|
||||
|
||||
/* Post-process the event after internal notification */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue