diff --git a/ChangeLog b/ChangeLog index 5f9e0c89..9bb65a3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ # $Id$ 2007-07-15 - * Fix PID display, patch #1753934. thanks to sohalt. + * Fix PID display, patch #1753934. thanks sohalt. + * Fix displaying 4 GB traffic after reloading network driver, + patch #1754260. thanks sohalt. 2007-06-21 * Right-justify top/top_mem vars (pid/cpu/mem} so they align on the decimal. diff --git a/src/linux.c b/src/linux.c index c163ae97..ce4b7451 100644 --- a/src/linux.c +++ b/src/linux.c @@ -185,17 +185,13 @@ inline void update_net_stats() /* if recv or trans is less than last time, an overflow happened */ if (r < ns->last_read_recv) - ns->recv += - ((long long) 4294967295U - - ns->last_read_recv) + r; + last_recv = 0; else ns->recv += (r - ns->last_read_recv); ns->last_read_recv = r; if (t < ns->last_read_trans) - ns->trans += - ((long long) 4294967295U - - ns->last_read_trans) + t; + last_trans = 0; else ns->trans += (t - ns->last_read_trans); ns->last_read_trans = t;