Package: gnome-netstatus-applet
Version: 2.12.1-1
Severity: normal
Tags: patch
gnome-netstatus-applet currently fails to update its statistics after
disconnection and reconnection. An investigation within the source
revealed it was because the status determination between current and
previous state is based on "packets" field, which, according to an
investigation in /proc/net/dev, will be reset to 0 after reconnection,
which in turn resulted in the status will be determined as "Idle" until
the new "packets" data is larger than the previously saved one. Whilst
the "bytes" field won't be reset to 0 and will continue to accumulate.
Changing the comparison criterion to bytes-based eliminates this glitch.
The patch is attached below.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (800, 'unstable'), (300, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gnome-netstatus-applet depends on:
ii gconf2 2.18.0.1-3 GNOME configuration database syste
ii gksu2.0.0-4 graphical frontend to su
ii libart-2.0-22.3.19-3 Library of functions for 2D graphi
ii libatk1.0-0 1.18.0-2 The ATK accessibility toolkit
ii libbonobo2-02.18.0-2 Bonobo CORBA interfaces library
ii libbonoboui2-0 2.18.0-5 The Bonobo UI library
ii libc6 2.6-2GNU C Library: Shared libraries
ii libcairo2 1.4.10-1 The Cairo 2D vector graphics libra
ii libfontconfig1 2.4.2-1.2generic font configuration library
ii libfreetype62.3.5-1+b1 FreeType 2 font engine, shared lib
ii libgconf2-4 2.18.0.1-3 GNOME configuration database syste
ii libglade2-0 1:2.6.1-1library to load .glade files at ru
ii libglib2.0-02.12.13-1The GLib library of C routines
ii libgnome-keyring0 0.8.1-2 GNOME keyring services library
ii libgnome2-0 2.18.0-4 The GNOME 2 library - runtime file
ii libgnomecanvas2-0 2.14.0-3 A powerful object-oriented display
ii libgnomeui-02.18.1-2 The GNOME 2 libraries (User Interf
ii libgnomevfs2-0 1:2.18.1-2 GNOME Virtual File System (runtime
ii libgtk2.0-0 2.10.13-1The GTK+ graphical user interface
ii libice6 2:1.0.3-3X11 Inter-Client Exchange library
ii liborbit2 1:2.14.7-0.1 libraries for ORBit2 - a CORBA ORB
ii libpanel-applet2-0 2.18.3-1 library for GNOME Panel applets
ii libpango1.0-0 1.16.5-1 Layout and rendering of internatio
ii libpng12-0 1.2.15~beta5-2 PNG library - runtime
ii libpopt01.10-3 lib for parsing cmdline parameters
ii libsm6 2:1.0.3-1+b1 X11 Session Management library
ii libx11-62:1.0.3-7X11 client-side library
ii libxcursor1 1:1.1.8-2X cursor management library
ii libxext61:1.0.3-2X11 miscellaneous extension librar
ii libxfixes3 1:4.0.3-2X11 miscellaneous 'fixes' extensio
ii libxi6 2:1.1.1-1X11 Input extension library
ii libxinerama11:1.0.2-1X11 Xinerama extension library
ii libxml2 2.6.29.dfsg-1GNOME XML library
ii libxrandr2 2:1.2.1-1X11 RandR extension library
ii libxrender1 1:0.9.2-1X Rendering Extension client libra
ii zlib1g 1:1.2.3.3.dfsg-5 compression library - runtime
gnome-netstatus-applet recommends no packages.
-- no debconf information
--- gnome-netstatus-2.12.1.orig/src/netstatus-iface.c 2007-02-13
17:39:19.0 +0800
+++ gnome-netstatus-2.12.1/src/netstatus-iface.c2007-08-05
22:52:54.0 +0800
@@ -524,8 +524,8 @@
in_bytes, out_bytes,
iface->priv->stats.in_bytes, iface->priv->stats.out_bytes);
- rx = in_packets > iface->priv->stats.in_packets;
- tx = out_packets > iface->priv->stats.out_packets;
+ rx = in_bytes > iface->priv->stats.in_bytes;
+ tx = out_bytes > iface->priv->stats.out_bytes;
if (!tx && !rx)
state = NETSTATUS_STATE_IDLE;