pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/pload Store traffic counters in u_quad_t to avoid ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/172f2f1326c4
branches:  trunk
changeset: 552481:172f2f1326c4
user:      shattered <shattered%pkgsrc.org@localhost>
date:      Sun Jan 04 20:03:21 2009 +0000

description:
Store traffic counters in u_quad_t to avoid overflow.  Closes PR 38168.
Take maintainership.

OK by wiz@.

diffstat:

 net/pload/Makefile         |   6 +++---
 net/pload/distinfo         |   4 +++-
 net/pload/patches/patch-ad |  22 ++++++++++++++++++++++
 net/pload/patches/patch-ae |  28 ++++++++++++++++++++++++++++
 4 files changed, 56 insertions(+), 4 deletions(-)

diffs (92 lines):

diff -r a2c44afc755b -r 172f2f1326c4 net/pload/Makefile
--- a/net/pload/Makefile        Sun Jan 04 20:02:29 2009 +0000
+++ b/net/pload/Makefile        Sun Jan 04 20:03:21 2009 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile,v 1.22 2008/11/10 17:21:37 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2009/01/04 20:03:21 shattered Exp $
 #
 
 DISTNAME=      pload-0.9.5
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    net x11
 MASTER_SITES=  ${MASTER_SITE_SUNSITE:=system/network/serial/ppp/}
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+MAINTAINER=    shattered%NetBSD.org@localhost
 HOMEPAGE=      http://web.archive.org/web/20050305142516/http://www.engr.utk.edu/~mdsmith/pload/
 COMMENT=       PPP monitor for X11, monitoring totals and current in/out rates
 
diff -r a2c44afc755b -r 172f2f1326c4 net/pload/distinfo
--- a/net/pload/distinfo        Sun Jan 04 20:02:29 2009 +0000
+++ b/net/pload/distinfo        Sun Jan 04 20:03:21 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2007/12/09 23:41:11 wiz Exp $
+$NetBSD: distinfo,v 1.8 2009/01/04 20:03:21 shattered Exp $
 
 SHA1 (pload-0.9.5.tar.gz) = 52e8ca31ad534cbc131d0bd19ef5ae45b5b37777
 RMD160 (pload-0.9.5.tar.gz) = 48ff961d760430a3a45533f7023b1fefa252ede8
@@ -6,3 +6,5 @@
 SHA1 (patch-aa) = 6a30a15c60e74eeb5312e275b1dac882c86b2420
 SHA1 (patch-ab) = 4bf2639b64d20717716c66be85c4fb5cd3b114d5
 SHA1 (patch-ac) = 345ac88bb5d279039ae0169c2b468b22964a0c09
+SHA1 (patch-ad) = 97e7f37561882098b080683237e661f2f5692025
+SHA1 (patch-ae) = d98a346e56d36eb5efd084eef1a95ca6c350c0f5
diff -r a2c44afc755b -r 172f2f1326c4 net/pload/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/pload/patches/patch-ad        Sun Jan 04 20:03:21 2009 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ad,v 1.1 2009/01/04 20:03:21 shattered Exp $
+
+--- pload.h.orig       2000-02-01 07:11:24.000000000 +0000
++++ pload.h
+@@ -35,10 +35,17 @@ struct if_dat
+ #ifdef LINUXPROC
+       FILE *file;                             /* /proc/net/dev        */
+ #endif        
++#ifdef __NetBSD__
++      u_quad_t in_bytes;                      /* total bytes in       */
++      u_quad_t in_bytes_old;                  /* last total bytes in  */
++      u_quad_t out_bytes;                     /* total bytes out      */
++      u_quad_t out_bytes_old;                 /* last total byts out  */
++#else
+       unsigned long in_bytes;                 /* total bytes in       */
+       unsigned long in_bytes_old;             /* last total bytes in  */
+       unsigned long out_bytes;                /* total bytes out      */
+       unsigned long out_bytes_old;            /* last total byts out  */
++#endif
+       struct timeval prev_time;               /* last time            */
+       struct timeval curr_time;               /* time now             */
+       int history_size;                       /* # pts to average over*/
diff -r a2c44afc755b -r 172f2f1326c4 net/pload/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/pload/patches/patch-ae        Sun Jan 04 20:03:21 2009 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-ae,v 1.1 2009/01/04 20:03:21 shattered Exp $
+
+--- pload.c.orig       2000-02-01 07:11:24.000000000 +0000
++++ pload.c
+@@ -40,7 +40,11 @@ static void HandleExit(void);
+ static void CheckForWMExit(Widget, XtPointer, XEvent*, Boolean*);
+ static void CheckForIconState(Widget, XtPointer, XEvent*, Boolean*);
+ static void update(XtPointer, XtIntervalId*);
++#ifdef __NetBSD__
++static void make_label(char*,u_quad_t,double,double);
++#else
+ static void make_label(char*,unsigned long,double,double);
++#endif
+ static void do_rate(char*,double);
+ static void do_total(char*, double);
+ 
+@@ -621,7 +625,11 @@ void do_rate(char *b, double rate)
+ }
+ 
+ /* stores label in global 'buff' */
++#ifdef __NetBSD__
++void make_label(char *fmt, u_quad_t total, double rate, double max)
++#else
+ void make_label(char *fmt, unsigned long total, double rate, double max)
++#endif
+ {
+       char *p;
+       int i;



Home | Main Index | Thread Index | Old Index