mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 03:20:11 +01:00
device: refresh the link before reading the stats
This commit is contained in:
parent
fc2f1d9cb8
commit
36f8ffad9f
1 changed files with 2 additions and 3 deletions
|
|
@ -47,6 +47,8 @@ update_stats (gpointer user_data)
|
|||
|
||||
ifindex = nm_device_get_ip_ifindex (self->device);
|
||||
|
||||
nm_platform_link_refresh (NM_PLATFORM_GET, ifindex);
|
||||
|
||||
pllink = nm_platform_link_get (NM_PLATFORM_GET, ifindex);
|
||||
if (pllink) {
|
||||
_LOGT ("ifindex %d: {RX} %"PRIu64" packets %"PRIu64" bytes {TX} %"PRIu64" packets %"PRIu64" bytes",
|
||||
|
|
@ -60,9 +62,6 @@ update_stats (gpointer user_data)
|
|||
nm_device_set_rx_bytes (self->device, 0);
|
||||
}
|
||||
|
||||
/* Keep polling */
|
||||
nm_platform_link_refresh (NM_PLATFORM_GET, ifindex);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue