diff options
author | jeh <jeh@FreeBSD.org> | 2003-11-10 03:27:19 +0800 |
---|---|---|
committer | jeh <jeh@FreeBSD.org> | 2003-11-10 03:27:19 +0800 |
commit | 91b8ee49362c17525b1ab0ac4755093496c5fd0d (patch) | |
tree | 61dc7d4002025178a6b0942214277a3a31ae7996 /deskutils | |
parent | 99ead80b6b4a8469e93961be32c4721c958ac430 (diff) | |
download | freebsd-ports-gnome-91b8ee49362c17525b1ab0ac4755093496c5fd0d.tar.gz freebsd-ports-gnome-91b8ee49362c17525b1ab0ac4755093496c5fd0d.tar.zst freebsd-ports-gnome-91b8ee49362c17525b1ab0ac4755093496c5fd0d.zip |
Update port: deskutils/superkaramba:
- update patch-networkdevice.cpp to improve network device detection
- bump PORTREVISION
PR: 59089
Submitted By: MAINTAINER
Diffstat (limited to 'deskutils')
-rw-r--r-- | deskutils/superkaramba/Makefile | 1 | ||||
-rw-r--r-- | deskutils/superkaramba/files/patch-networksensor.cpp | 34 |
2 files changed, 17 insertions, 18 deletions
diff --git a/deskutils/superkaramba/Makefile b/deskutils/superkaramba/Makefile index a75cd08ed4e0..e00fe7486a9e 100644 --- a/deskutils/superkaramba/Makefile +++ b/deskutils/superkaramba/Makefile @@ -6,6 +6,7 @@ PORTNAME= superkaramba PORTVERSION= 0.33 +PORTREVISION= 1 CATEGORIES= deskutils kde MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= netdragon diff --git a/deskutils/superkaramba/files/patch-networksensor.cpp b/deskutils/superkaramba/files/patch-networksensor.cpp index 413d1f98d207..eb1df1936b87 100644 --- a/deskutils/superkaramba/files/patch-networksensor.cpp +++ b/deskutils/superkaramba/files/patch-networksensor.cpp @@ -1,6 +1,6 @@ --- src/networksensor.cpp.orig Mon Apr 21 15:17:03 2003 -+++ src/networksensor.cpp Sat Nov 8 19:51:04 2003 -@@ -7,14 +7,67 @@ ++++ src/networksensor.cpp Sun Nov 9 18:34:35 2003 +@@ -7,14 +7,65 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ @@ -11,7 +11,6 @@ +#include <net/route.h> +#endif + -+#include <stdio.h> #include "networksensor.h" NetworkSensor::NetworkSensor( QString dev, int interval ):Sensor( interval ) @@ -40,27 +39,26 @@ + */ + + if_number = -1; ++ int if_gw = -1; + + for (int i = 1; i <= n; ++i) { + name[4] = i; + /* Get data for iface-number i */ + sysctl(name, 6, (void*)&if_mib, (size_t*)&if_miblen, (void*)NULL, (size_t)0); + -+ if ( device == "" ) { -+ /* Does the interface hold the default route? */ -+ if ( if_mib.ifmd_flags & RTF_GATEWAY ) { -+ if_number = i; -+ break; -+ } -+ } -+ else { -+ /* We found the right interface? */ -+ if (QString(if_mib.ifmd_name) == device) { -+ if_number = i; -+ break; -+ } ++ /* We found the right interface? */ ++ if (QString(if_mib.ifmd_name) == device) { ++ if_number = i; ++ break; + } ++ ++ /* Does the interface hold the default route? */ ++ if ( if_mib.ifmd_flags & RTF_GATEWAY ) ++ if_gw = i; + } ++ ++ if ((if_number == -1) && (if_gw != -1)) ++ if_number = if_gw; +#else if( device == "" ) device = "eth0"; @@ -69,7 +67,7 @@ getInOutBytes(receivedBytes,transmittedBytes); netTimer.start(); -@@ -24,6 +77,27 @@ +@@ -24,6 +75,27 @@ } void NetworkSensor::getInOutBytes ( unsigned long &in,unsigned long &out) const { @@ -97,7 +95,7 @@ QFile file("/proc/net/dev"); QString line; if ( file.open(IO_ReadOnly | IO_Translate) ) -@@ -49,6 +123,7 @@ +@@ -49,6 +121,7 @@ } file.close(); } |