gnome-system-monitor r2443 - branches/gnome-2-22/src



Author: bdejean
Date: Wed Jun 18 16:23:55 2008
New Revision: 2443
URL: http://svn.gnome.org/viewvc/gnome-system-monitor?rev=2443&view=rev

Log:
------------------------------------------------------------------------
r2442 | bdejean | 2008-06-17 22:35:33 +0200 (mar, 17 jun 2008) | 4 lines

Fixed network speed when there are pseudo-devices with no address.
Patch by Mark Karpeles <mark hell ne jp>.
Closes #535544.


Modified:
   branches/gnome-2-22/src/load-graph.cpp

Modified: branches/gnome-2-22/src/load-graph.cpp
==============================================================================
--- branches/gnome-2-22/src/load-graph.cpp	(original)
+++ branches/gnome-2-22/src/load-graph.cpp	Wed Jun 18 16:23:55 2008
@@ -467,6 +467,18 @@
 		if (netload.if_flags & (1 << GLIBTOP_IF_FLAGS_LOOPBACK))
 			continue;
 
+		/* Skip interfaces without any IPv4/IPv6 address (or
+		 those with only a LINK ipv6 addr) However we need to
+		 be able to exclude these while still keeping the
+		 value so when they get online (with NetworkManager
+		 for example) we don't get a suddent peak.  Once we're
+		 able to get this, ignoring down interfaces will be
+		 possible too.  */
+		if (not (netload.flags & (1 << GLIBTOP_NETLOAD_ADDRESS6)
+			 and netload.scope6 != GLIBTOP_IF_IN6_SCOPE_LINK)
+		    and not (netload.flags & (1 << GLIBTOP_NETLOAD_ADDRESS)))
+			continue;
+
 		/* Don't skip interfaces that are down (GLIBTOP_IF_FLAGS_UP)
 		   to avoid spikes when they are brought up */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]