Your message dated Sun, 09 Sep 2018 14:40:26 +0000
with message-id <[email protected]>
and subject line Bug#629252: fixed in wmnd 0.4.17-3
has caused the Debian Bug report #629252,
regarding wmnd shows no traffic when 32 bit counter overflows
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
629252: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629252
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: wmnd
Version: 0.4.16-1
Severity: important
Tags: upstream patch

wmnd shows no traffic when 32 bit counter overflows, 'cos sscanf() returns
4294967295 (0xffffffff) in that case.

-- System Information:
Debian Release: wheezy/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'testing'), (500, 'stable'), (90, 
'experimental'), (90, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.39+vc+ipmi+ow+imq (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=ru_RU.CP1251 (charmap=CP1251)
Shell: /bin/sh linked to /bin/bash

Versions of packages wmnd depends on:
ii  libc6                         2.13-4     Embedded GNU C Library: Shared lib
ii  libice6                       2:1.0.7-1  X11 Inter-Client Exchange library
ii  libsm6                        2:1.2.0-1  X11 Session Management library
ii  libx11-6                      2:1.4.3-1  X11 client-side library
ii  libxext6                      2:1.3.0-1  X11 miscellaneous extension librar
ii  libxpm4                       1:3.5.9-1  X11 pixmap library

wmnd recommends no packages.

wmnd suggests no packages.

-- no debconf information


-- System Information:
Debian Release: wheezy/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'testing'), (500, 'stable'), (90, 
'experimental'), (90, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.39+vc+ipmi+ow+imq (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=ru_RU.CP1251 (charmap=CP1251)
Shell: /bin/sh linked to /bin/bash

Versions of packages wmnd depends on:
ii  libc6                         2.13-4     Embedded GNU C Library: Shared lib
ii  libice6                       2:1.0.7-1  X11 Inter-Client Exchange library
ii  libsm6                        2:1.2.0-1  X11 Session Management library
ii  libx11-6                      2:1.4.3-1  X11 client-side library
ii  libxext6                      2:1.3.0-1  X11 miscellaneous extension librar
ii  libxpm4                       1:3.5.9-1  X11 pixmap library

wmnd recommends no packages.

wmnd suggests no packages.

-- no debconf information
>From 555735c28e773b651ed7ee1e803fc0dc7d03b842 Mon Sep 17 00:00:00 2001
From: Vladimir Prodan <[email protected]>
Date: Sun, 5 Jun 2011 01:09:14 +0400
Subject: [PATCH 1/3] make byte/packet counters 64 bit

wmnd shows no traffic when 32 bit counter overflows, sscanf() return
4294967295 (0xffffffff) in that case. Simple test:

int main()
{
    const char *str = "4294967296 4299967296";
    {
    unsigned long ib1, ib2;
    sscanf(str, "%lu %lu", &ib1, &ib2);
    printf("%lu %lu\n", ib1, ib2);
    printf("%lu\n", ib2-ib1);
    }
    {
    unsigned long long ib1, ib2;
    sscanf(str, "%llu %llu", &ib1, &ib2);
    printf("%llu %llu\n", ib1, ib2);
    printf("%llu\n", ib2-ib1);
    }
    return 0;
}

Output:

4294967295 4294967295
0
4294967296 4299967296
5000000
---
 configure.ac  |    2 +-
 src/display.c |   22 +++++++++++-----------
 src/display.h |    2 +-
 src/drivers.c |   54 ++++++++++++++++++++++++++++--------------------------
 src/drivers.h |    4 ++--
 src/wmnd.c    |   52 ++++++++++++++++++++++++++--------------------------
 src/wmnd.h    |   26 +++++++++++++-------------
 7 files changed, 82 insertions(+), 80 deletions(-)

diff --git a/configure.ac b/configure.ac
index c338cec..5b9b984 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ AC_SEARCH_LIBS(sin, m,, [AC_MSG_ERROR(math library is required)])
 
 # X libraries
 AC_PATH_XTRA
-CFLAGS="$CFLAGS $X_CFLAGS"
+CFLAGS="-W -Wall $CFLAGS $X_CFLAGS"
 LDFLAGS="$LDFLAGS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
 
 # check for XPM headers, libraries
diff --git a/src/display.c b/src/display.c
index 644a4a1..88c980f 100644
--- a/src/display.c
+++ b/src/display.c
@@ -72,7 +72,7 @@ trunc_normal(unsigned size, unsigned* rx, unsigned* tx)
 #ifdef USE_DRW_TRADITIONAL
 /* Traditional mode */
 void
-drwTraditional(unsigned long* hist, unsigned mIn, unsigned mOut,
+drwTraditional(unsigned long long* hist, unsigned mIn, unsigned mOut,
     unsigned size, unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, txlev, rxlev, nolev;
@@ -98,7 +98,7 @@ drwTraditional(unsigned long* hist, unsigned mIn, unsigned mOut,
 #ifdef USE_DRW_MGRAPH
 /* MGraph mode */
 void
-drwMGraph(unsigned long* hist, unsigned mIn, unsigned mOut,
+drwMGraph(unsigned long long* hist, unsigned mIn, unsigned mOut,
     unsigned size, unsigned long long rx_max, unsigned long long tx_max)
 {
   /* max scale */
@@ -140,7 +140,7 @@ drwMGraph(unsigned long* hist, unsigned mIn, unsigned mOut,
 #ifdef USE_DRW_WAVEFORM
 /* Waveform mode */
 void
-drwWaveform(unsigned long* hist, unsigned mIn, unsigned mOut,
+drwWaveform(unsigned long long* hist, unsigned mIn, unsigned mOut,
     unsigned size, unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, txlev, rxlev, center;
@@ -169,7 +169,7 @@ drwWaveform(unsigned long* hist, unsigned mIn, unsigned mOut,
 #ifdef USE_DRW_WMWAVE
 /* Reverse wmnet mode */
 void
-drwWmwave(unsigned long* hist, unsigned mIn, unsigned mOut,
+drwWmwave(unsigned long long* hist, unsigned mIn, unsigned mOut,
     unsigned size, unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, msize, bpp, txlev, rxlev, center;
@@ -198,7 +198,7 @@ drwWmwave(unsigned long* hist, unsigned mIn, unsigned mOut,
 #ifdef USE_DRW_WMNET
 /* Wmnet like modeness */
 void
-drwWmnet(unsigned long* hist, unsigned mIn, unsigned mOut, unsigned size,
+drwWmnet(unsigned long long* hist, unsigned mIn, unsigned mOut, unsigned size,
     unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, txlev, rxlev, nolev;
@@ -233,7 +233,7 @@ drwWmnet(unsigned long* hist, unsigned mIn, unsigned mOut, unsigned size,
 #ifdef USE_DRW_SEPGRAPHS
 /* Separated graphs mode */
 void
-drwSepgraphs(unsigned long* hist, unsigned mIn, unsigned mOut,
+drwSepgraphs(unsigned long long* hist, unsigned mIn, unsigned mOut,
     unsigned size, unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, msize, txlev, rxlev, center, rxBpp, txBpp;
@@ -263,7 +263,7 @@ drwSepgraphs(unsigned long* hist, unsigned mIn, unsigned mOut,
 #ifdef USE_DRW_TWISTED
 /* Twisted mode */
 void
-drwTwisted(unsigned long* hist, unsigned mIn, unsigned mOut,
+drwTwisted(unsigned long long* hist, unsigned mIn, unsigned mOut,
     unsigned size, unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, stpos, itn, txlev, rxlev;
@@ -303,7 +303,7 @@ drwTwisted(unsigned long* hist, unsigned mIn, unsigned mOut,
 #if defined(USE_DRW_CHARTS) || defined(USE_DRW_NEEDLE)
 /* func utils */
 void
-drwGetMeds(const unsigned long* hist, const unsigned mIn,
+drwGetMeds(const unsigned long long* hist, const unsigned mIn,
     const unsigned mOut, unsigned long* tx_med,
     unsigned long* rx_med)
 {
@@ -323,7 +323,7 @@ drwGetMeds(const unsigned long* hist, const unsigned mIn,
 
 #ifdef USE_DRW_CHARTS
 /* Charts mode */
-void drwCharts(unsigned long* hist, unsigned mIn, unsigned mOut, unsigned size,
+void drwCharts(unsigned long long* hist, unsigned mIn, unsigned mOut, unsigned size,
     unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, j, stpos, spc;
@@ -378,7 +378,7 @@ drwRotPoint(const unsigned len, const double rad,
 }
 
 /* needle mode */
-void drwNeedle(unsigned long* hist, unsigned mIn, unsigned mOut, unsigned size,
+void drwNeedle(unsigned long long* hist, unsigned mIn, unsigned mOut, unsigned size,
     unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, stpos, offset, nX, nY;
@@ -454,7 +454,7 @@ void drwNeedle(unsigned long* hist, unsigned mIn, unsigned mOut, unsigned size,
 
 #ifdef USE_DRW_LINES
 /* lines mode */
-void drwLines(unsigned long* hist, unsigned mIn, unsigned mOut, unsigned size,
+void drwLines(unsigned long long* hist, unsigned mIn, unsigned mOut, unsigned size,
     unsigned long long rx_max, unsigned long long tx_max)
 {
   unsigned int k, oTxlev, oRxlev, txlev, rxlev;
diff --git a/src/display.h b/src/display.h
index f05f692..5f316fb 100644
--- a/src/display.h
+++ b/src/display.h
@@ -28,7 +28,7 @@
 struct drwStruct
 {
   char* funcName;
-  void (*funcPtr)(unsigned long* hist, unsigned mIn, unsigned mOut,
+  void (*funcPtr)(unsigned long long* hist, unsigned mIn, unsigned mOut,
       unsigned size, unsigned long long rx_max, unsigned long long tx_max);
 };
 
diff --git a/src/drivers.c b/src/drivers.c
index ed67fc8..6ceb77d 100644
--- a/src/drivers.c
+++ b/src/drivers.c
@@ -215,8 +215,8 @@ solaris_fpppd_list(const char* devname, struct Devices* list)
 }
 
 int
-solaris_fpppd_get(struct Devices* dev, unsigned long* ip,
-    unsigned long* op, unsigned long* ib, unsigned long* ob)
+solaris_fpppd_get(struct Devices* dev, unsigned long long* ip,
+    unsigned long long* op, unsigned long long* ib, unsigned long long* ob)
 {
   static struct ppp_stats curp;
   struct solaris_fpppd_drvdata* drvdata = dev->drvdata;
@@ -340,8 +340,8 @@ solaris_kstat_init(struct Devices* dev)
 }
 
 int
-solaris_kstat_get(struct Devices* dev, unsigned long* ip, unsigned long* op,
-    unsigned long* ib, unsigned long* ob)
+solaris_kstat_get(struct Devices* dev, unsigned long long* ip, unsigned long long* op,
+    unsigned long long* ib, unsigned long long* ob)
 {
   struct solaris_kstat_drvdata* drvdata =
     (struct solaris_kstat_drvdata*)dev->drvdata;
@@ -411,13 +411,13 @@ testing_dummy_init(struct Devices* dev)
 }
 
 int
-testing_dummy_get(struct Devices* dev, unsigned long* ip, unsigned long* op,
-    unsigned long* ib, unsigned long* ob)
+testing_dummy_get(struct Devices* dev, unsigned long long* ip, unsigned long long* op,
+    unsigned long long* ib, unsigned long long* ob)
 {
   /* some more fun when debugging! */
   static float v = 0.;
-  static unsigned long is = 0;
-  static unsigned long os = 0;
+  static unsigned long long is = 0;
+  static unsigned long long os = 0;
 
   *ip = *ib = (is += (16384. * cos(v)) + 16384);
   *op = *ob = (os += (16384. * sin(v)) + 16384);
@@ -502,8 +502,8 @@ linux_proc_list(const char* devname, struct Devices* list)
 }
 
 int
-linux_proc_get(struct Devices* dev, unsigned long* ip, unsigned long* op,
-    unsigned long* ib, unsigned long* ob)
+linux_proc_get(struct Devices* dev, unsigned long long* ip, unsigned long long* op,
+    unsigned long long* ib, unsigned long long* ob)
 {
   FILE* fp;
   char temp[MAXBUF];
@@ -524,13 +524,15 @@ linux_proc_get(struct Devices* dev, unsigned long* ip, unsigned long* op,
     if(!strcmp(strtok(temp, linux_proc_tokens), dev->name))
     {
       p = strchr(temp, 0) + 1;
-      sscanf(p, "%lu %lu %*s %*s %*s %*s %*s %*s %lu %lu", ib, ip, ob, op);
+      sscanf(p, "%llu %llu %*s %*s %*s %*s %*s %*s %llu %llu", ib, ip, ob, op);
       active = 0;
       break;
     }
   }
   fclose(fp);
 
+  printf("linux_proc_get('%s') = %llub, %llup in, %llub, %llup out\n", dev->name, *ib, *ip, *ob, *op);
+
   return active;
 }
 
@@ -629,8 +631,8 @@ freebsd_sysctl_list(const char* devname, struct Devices* list)
 
 /* gather stats */
 int
-freebsd_sysctl_get(struct Devices*dev, unsigned long* ip,
-    unsigned long* op, unsigned long* ib, unsigned long* ob)
+freebsd_sysctl_get(struct Devices*dev, unsigned long long* ip,
+    unsigned long long* op, unsigned long long* ib, unsigned long long* ob)
 {
   struct freebsd_sysctl_drvdata* drdata = dev->drvdata;
   int datamib[6];
@@ -803,8 +805,8 @@ irix_pcp_init(struct Devices* dev)
 }
 
 int
-irix_pcp_get(struct Devices* dev, unsigned long* ip, unsigned long* op,
-    unsigned long* ib, unsigned long* ob)
+irix_pcp_get(struct Devices* dev, unsigned long long* ip, unsigned long long* op,
+    unsigned long long* ib, unsigned long long* ob)
 {
   /* switch to the right context */
   struct irix_pcp_drvdata* drdata =
@@ -1131,8 +1133,8 @@ generic_snmp_init(struct Devices* dev)
 }
 
 int
-generic_snmp_get(struct Devices* dev, unsigned long* ip, unsigned long* op,
-    unsigned long* ib, unsigned long* ob)
+generic_snmp_get(struct Devices* dev, unsigned long long* ip, unsigned long long* op,
+    unsigned long long* ib, unsigned long long* ob)
 {
   /* switch to the right context */
   struct generic_snmp_drvdata* drdata =
@@ -1282,35 +1284,35 @@ struct drivers_struct drivers_table[] =
 {
 #ifdef USE_FREEBSD_SYSCTL
   {USE_FREEBSD_SYSCTL, freebsd_sysctl_list, NULL,
-    freebsd_sysctl_get, freebsd_sysctl_term, NULL},
+    freebsd_sysctl_get, freebsd_sysctl_term, NULL, 0},
 #endif
 #ifdef USE_NETBSD_IOCTL
   {USE_NETBSD_IOCTL, netbsd_ioctl_list, NULL,
-    netbsd_ioctl_get, NULL, netbsd_ioctl_unlist},
+    netbsd_ioctl_get, NULL, netbsd_ioctl_unlist, 0},
 #endif
 #ifdef USE_LINUX_PROC
   {USE_LINUX_PROC, linux_proc_list, NULL,
-    linux_proc_get, NULL, NULL},
+    linux_proc_get, NULL, NULL, 0},
 #endif
 #ifdef USE_SOLARIS_FPPPD
   {USE_SOLARIS_FPPPD, solaris_fpppd_list, solaris_fpppd_init,
-    solaris_fpppd_get, solaris_fpppd_term, NULL},
+    solaris_fpppd_get, solaris_fpppd_term, NULL, 0},
 #endif
 #ifdef USE_SOLARIS_KSTAT
   {USE_SOLARIS_KSTAT, solaris_kstat_list, solaris_kstat_init,
-    solaris_kstat_get, solaris_kstat_term, NULL},
+    solaris_kstat_get, solaris_kstat_term, NULL, 0},
 #endif
 #ifdef USE_IRIX_PCP
   {USE_IRIX_PCP, irix_pcp_list, irix_pcp_init,
-    irix_pcp_get, irix_pcp_term, NULL},
+    irix_pcp_get, irix_pcp_term, NULL, 0},
 #endif
 #ifdef USE_GENERIC_SNMP
   {USE_GENERIC_SNMP, generic_snmp_list, generic_snmp_init,
-    generic_snmp_get, generic_snmp_term, NULL},
+    generic_snmp_get, generic_snmp_term, NULL, 0},
 #endif
 #ifdef USE_TESTING_DUMMY
   {USE_TESTING_DUMMY, testing_dummy_list, testing_dummy_init,
-    testing_dummy_get, NULL, NULL},
+    testing_dummy_get, NULL, NULL, 0},
 #endif
-  {NULL, NULL, NULL, NULL, NULL, NULL}
+  {NULL, NULL, NULL, NULL, NULL, NULL, 0}
 };
diff --git a/src/drivers.h b/src/drivers.h
index b112997..a137bd2 100644
--- a/src/drivers.h
+++ b/src/drivers.h
@@ -32,8 +32,8 @@
 
 typedef int (*p_list_devs) (const char* devname, struct Devices* list);
 typedef int (*p_init_dev) (struct Devices* dev);
-typedef int (*p_updt_stats) (struct Devices* dev, unsigned long* ip,
-    unsigned long* op, unsigned long* ib, unsigned long* ob);
+typedef int (*p_updt_stats) (struct Devices* dev, unsigned long long* ip,
+    unsigned long long* op, unsigned long long* ib, unsigned long long* ob);
 typedef void (*p_term_dev) (struct Devices* dev);
 typedef void (*p_term_drv) ();
 
diff --git a/src/wmnd.c b/src/wmnd.c
index de65cbf..1096ba0 100644
--- a/src/wmnd.c
+++ b/src/wmnd.c
@@ -49,25 +49,25 @@ int check_mr(int x, int y);
 void beat_event(void);
 void click_event(unsigned int region, unsigned int button);
 static void led_control(const unsigned char led, const unsigned char mode);
-void scale(char* rx_buf, char* tx_buf, unsigned long rx,
-    unsigned long tx, const int gap);
-void metric_scale(unsigned char sign, unsigned long value, char* buf);
-void binary_scale(unsigned char sign, unsigned long value, char* buf);
+void scale(char* rx_buf, char* tx_buf, unsigned long long rx,
+    unsigned long long tx, const int gap);
+void metric_scale(unsigned char sign, unsigned long long value, char* buf);
+void binary_scale(unsigned char sign, unsigned long long value, char* buf);
 void draw_string(const char* buf, unsigned int x, unsigned int y);
-void smooth(unsigned long* stat, const unsigned long last, const float smooth);
+void smooth(unsigned long long* stat, const unsigned long long last, const float smooth);
 
 /* device statistics */
 void draw_interface(void);
-void draw_rate(unsigned long rx, unsigned long tx, const int gap);
-void draw_max(unsigned long rx, unsigned long tx);
+void draw_rate(unsigned long long rx, unsigned long long tx, const int gap);
+void draw_max(unsigned long long rx, unsigned long long tx);
 void draw_stats(struct Devices *ptr, const int gap);
 
 /* driver functions */
 int devices_init(const char* driver, const char* interface);
 void devices_select(const char* interface);
 void devices_prev(void);
-void devices_getstat(struct Devices *device, unsigned long* ip,
-    unsigned long* op, unsigned long* ib, unsigned long* ob);
+void devices_getstat(struct Devices *device, unsigned long long* ip,
+    unsigned long long* op, unsigned long long* ib, unsigned long long* ob);
 void devices_destroy(void);
 
 /* useless shit */
@@ -594,7 +594,7 @@ exec_trend(struct Devices* dev, int bp)
     int x, idx;
     idx = (bp? 0: 2);
     for(x = 0; x != 58; ++x)
-      fprintf(trendFd[i], "%lu %lu\n",
+      fprintf(trendFd[i], "%llu %llu\n",
 	  dev->his[x][idx + 0], dev->his[x][idx + 1]);
     fflush(trendFd[i]);
   }
@@ -700,7 +700,7 @@ click_event(unsigned int region, unsigned int button)
 
 
 void
-smooth(unsigned long* stat, const unsigned long last, const float smooth)
+smooth(unsigned long long* stat, const unsigned long long last, const float smooth)
 {
   *stat = ((unsigned long)(last + (smooth * (*stat - last))));
 }
@@ -728,7 +728,7 @@ int main(int argc, char* *argv)
   int parse_conf = 1;
   char* conf_file = NULL;
   struct Devices* ptr;
-  unsigned long ib, ob, ip, op;
+  unsigned long long ib, ob, ip, op;
   int ch;
   unsigned btn = 0;
   int rgn = -1;
@@ -1096,7 +1096,7 @@ int main(int argc, char* *argv)
 		close_trend(i);
 	      else
 	      {
-		fprintf(trendFd[i], "%lu %lu\n",
+		fprintf(trendFd[i], "%llu %llu\n",
 		    ptr->his[57][idx + 0], ptr->his[57][idx + 1]);
 		fflush(trendFd[i]);
 	      }
@@ -1164,7 +1164,7 @@ int main(int argc, char* *argv)
 
 
 void
-binary_scale(unsigned char sign, unsigned long value, char* buf)
+binary_scale(unsigned char sign, unsigned long long value, char* buf)
 {
   unsigned char scale;
   unsigned int i;
@@ -1193,7 +1193,7 @@ binary_scale(unsigned char sign, unsigned long value, char* buf)
   else
     scale = ' ';
 
-  snprintf(buf, 7, "%c%lu", sign, value);
+  snprintf(buf, 7, "%c%llu", sign, value);
   r = buf;
   r++;
 
@@ -1209,7 +1209,7 @@ binary_scale(unsigned char sign, unsigned long value, char* buf)
 
 
 void
-metric_scale(unsigned char sign, unsigned long value, char* buf)
+metric_scale(unsigned char sign, unsigned long long value, char* buf)
 {
   float f;
   unsigned char scale;
@@ -1256,8 +1256,8 @@ metric_scale(unsigned char sign, unsigned long value, char* buf)
 
 
 void
-scale(char* rx_buf, char* tx_buf, unsigned long rx,
-    unsigned long tx, const int gap)
+scale(char* rx_buf, char* tx_buf, unsigned long long rx,
+    unsigned long long tx, const int gap)
 {
   char rx_sign, tx_sign;
 
@@ -1393,7 +1393,7 @@ draw_string(const char* buf, unsigned int x, unsigned int y)
 
 
 void
-draw_rate(unsigned long rx, unsigned long tx, const int gap)
+draw_rate(unsigned long long rx, unsigned long long tx, const int gap)
 {
   char rx_buf[8];
   char tx_buf[8];
@@ -1411,7 +1411,7 @@ draw_rate(unsigned long rx, unsigned long tx, const int gap)
 
 
 void
-draw_max(unsigned long rx, unsigned long tx)
+draw_max(unsigned long long rx, unsigned long long tx)
 {
   char rx_buf[16];
   char tx_buf[16];
@@ -1434,7 +1434,7 @@ void
 draw_stats(struct Devices *ptr, const int gap)
 {
   unsigned int k;
-  unsigned long* p;
+  unsigned long long* p;
   unsigned int in, out;
   unsigned long rx_max_his, tx_max_his;
   unsigned long long rx_max, tx_max;
@@ -1464,7 +1464,7 @@ draw_stats(struct Devices *ptr, const int gap)
 
   /* find maximum value in screen history */
   rx_max = tx_max = 0;
-  p = (unsigned long*)ptr->his;
+  p = (unsigned long long*)ptr->his;
   for(k = 0; k < 58; k++)
   {
     rx_max = MAX(rx_max, p[in]);
@@ -1481,7 +1481,7 @@ draw_stats(struct Devices *ptr, const int gap)
   else
     draw_max(rx_max_his, tx_max_his);
 
-  p = (unsigned long*)ptr->his;
+  p = (unsigned long long*)ptr->his;
   (*drwFuncs[wmnd.wavemode].funcPtr)(p, in, out, size, rx_max, tx_max);
 
   /* copy connection time over the graph */
@@ -1774,7 +1774,7 @@ devices_init(const char* driver, const char* interface)
       {
 	/* initialize statistics for this device */
 	int cnt;
-	unsigned long int ib, ob, ip, op;
+	unsigned long long ib, ob, ip, op;
 
 	/* sample some stats to inizialize cleanly the graph */
 	(*drivers_table[prt->drvnum].get_stats)(prt, &ip, &op, &ib, &ob);
@@ -1865,8 +1865,8 @@ devices_select(const char* interface)
 
 
 void
-devices_getstat(struct Devices *device, unsigned long* ip, unsigned long* op,
-    unsigned long* ib, unsigned long* ob)
+devices_getstat(struct Devices *device, unsigned long long* ip, unsigned long long* op,
+    unsigned long long* ib, unsigned long long* ob)
 {
   /*
    * devices_getstat: run appropriate get_stats for device
diff --git a/src/wmnd.h b/src/wmnd.h
index 07504b5..442be65 100644
--- a/src/wmnd.h
+++ b/src/wmnd.h
@@ -59,18 +59,18 @@ struct Devices
   int online;               /* 0 for online, 1 for offline */
   time_t devstart;          /* device activity start, 0 for unavaible */
 
-  unsigned long avg[4];     /* average sampling - last samples */
-  unsigned long avgBuf[4];  /* average sampling - buffers */
-
-  unsigned long his[59][4];
-  unsigned long ib_stat_last;
-  unsigned long ob_stat_last;
-  unsigned long ip_stat_last;
-  unsigned long op_stat_last;
-  unsigned long ib_max_his; /* maximum input bytes in history */
-  unsigned long ob_max_his; /* maximum output bytes in history */
-  unsigned long ip_max_his; /* maximum input packets in history */
-  unsigned long op_max_his; /* maximum output packets in history */
+  unsigned long long avg[4];     /* average sampling - last samples */
+  unsigned long long avgBuf[4];  /* average sampling - buffers */
+
+  unsigned long long his[59][4];
+  unsigned long long ib_stat_last;
+  unsigned long long ob_stat_last;
+  unsigned long long ip_stat_last;
+  unsigned long long op_stat_last;
+  unsigned long long ib_max_his; /* maximum input bytes in history */
+  unsigned long long ob_max_his; /* maximum output bytes in history */
+  unsigned long long ip_max_his; /* maximum input packets in history */
+  unsigned long long op_max_his; /* maximum output packets in history */
 };
 
 struct var
@@ -87,7 +87,7 @@ typedef struct {
   unsigned int nWavemodes;              /* numbers of wave graph */
   struct Devices* curdev;               /* current device */
   void                                  /* scale function */
-  (*scale)(unsigned char sign, unsigned long value, char* buf);
+  (*scale)(unsigned char sign, unsigned long long value, char* buf);
   unsigned int refresh;	                /* speed of the refresh */
   unsigned int avgSteps;                /* number of steps to average */
   unsigned int avgRSteps;               /* number of remaining steps */
-- 
1.7.4.4


--- End Message ---
--- Begin Message ---
Source: wmnd
Source-Version: 0.4.17-3

We believe that the bug you reported is fixed in the latest version of
wmnd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Robert Luberda <[email protected]> (supplier of updated wmnd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 09 Sep 2018 12:08:13 +0200
Source: wmnd
Binary: wmnd wmnd-snmp
Architecture: source amd64
Version: 0.4.17-3
Distribution: unstable
Urgency: medium
Maintainer: Robert Luberda <[email protected]>
Changed-By: Robert Luberda <[email protected]>
Description:
 wmnd       - Dockapp monitoring network interfaces
 wmnd-snmp  - Dockapp monitoring network interfaces with SNMP support
Closes: 629252
Changes:
 wmnd (0.4.17-3) unstable; urgency=medium
 .
   * Switch to debhelper v11.
   * debian/rules: Enable all hardening and LFS flags.
   * Add 02-Make-counters-64-bit.patch from Vladimir Prodan to make byte/packet
     counters 64 bit on 32-bit systems (closes: #629252).
   * Add 03-Fix-compiler-warnings.patch to fix warnings generated by gcc-8.
   * Switch debian/copyright to DEP-5 format.
   * debian/watch: use https and check gpg signature (lintian).
   * Add DEP-12 upstream metadata file.
   * Provide simple testsuite for autopkgtest to check installability of the
     binary packages (lintian).
   * debian/control:
     + update Vcs-* fields for salsa migration;
     + use https protocol in the `Homepage' field;
     + suggest snmp-mips-downloader for wmnd-snmp package (see: #574388);
     + set `Rules-Requires-Root' to `no';
     + Standards-Version: 4.2.1.
Checksums-Sha1:
 3d60c7bd0c64bee0d1f698300aaf7f35dd2b06e6 1914 wmnd_0.4.17-3.dsc
 18fbc46b7d0fed011c8f64d96798a9443b152268 13276 wmnd_0.4.17-3.debian.tar.xz
 13c1d8eaf8abfe3f21f8d72d278bfc466c66ec37 62956 wmnd-dbgsym_0.4.17-3_amd64.deb
 4cae75ce3f0ef2ff0ef9746e28e669f896bdf9c0 71156 
wmnd-snmp-dbgsym_0.4.17-3_amd64.deb
 8581d96d92ade569b54ba98648ab09a8d79144f2 57304 wmnd-snmp_0.4.17-3_amd64.deb
 1e78c77d9efc1ceaa14d10acd60a44d7669aa3d9 7290 wmnd_0.4.17-3_amd64.buildinfo
 c3963256f87e4e8bfc52defa4f8a979247849bf5 55580 wmnd_0.4.17-3_amd64.deb
Checksums-Sha256:
 9e72a3ff0d02dc4785ebf00d5b89b2249cdf0d1dfea4d2b88778f89968a3d1e4 1914 
wmnd_0.4.17-3.dsc
 15c91422e1ac111d1f7cb622304dd7ee77f8c53947a524fb53ac421b65172c5b 13276 
wmnd_0.4.17-3.debian.tar.xz
 ef3dc8a114a31258008621c74fedc4904d8547fc442741f19363bdf0c525c353 62956 
wmnd-dbgsym_0.4.17-3_amd64.deb
 f360f9dd4acde7efc8905fb742100374426c2c0c9d0ee9190e51c72a1feb4fc8 71156 
wmnd-snmp-dbgsym_0.4.17-3_amd64.deb
 8049f469b3dfa6e6b9d6a0cebfb03c13eaffb4daa9874e5312aba5229f293f11 57304 
wmnd-snmp_0.4.17-3_amd64.deb
 d47195973435184cc530e381937ad1e01c08e6fa3ff5088c22bc96d5662ee71a 7290 
wmnd_0.4.17-3_amd64.buildinfo
 5375fa184a1b31a1417dcc556c76b7bc86edc04c54018bc46444e74df530421a 55580 
wmnd_0.4.17-3_amd64.deb
Files:
 be3fac181bcc4dc20deaf010d2c8c5c6 1914 net optional wmnd_0.4.17-3.dsc
 4414e8e980d310ee16c319c40fa34388 13276 net optional wmnd_0.4.17-3.debian.tar.xz
 d1cf83292438655c139e9a18ada71f98 62956 debug optional 
wmnd-dbgsym_0.4.17-3_amd64.deb
 8ff6dff59bf095acac249e19738fbf59 71156 debug optional 
wmnd-snmp-dbgsym_0.4.17-3_amd64.deb
 42702eb0574bcce05764b99bcb5ae582 57304 net optional 
wmnd-snmp_0.4.17-3_amd64.deb
 905bd3ad3296d10decd252f790a3d779 7290 net optional 
wmnd_0.4.17-3_amd64.buildinfo
 42cafc7f8edd21d53bf17944364137fc 55580 net optional wmnd_0.4.17-3_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEENeh2+rTTcy6TtNI3Yx3nVTvor9QFAluU8tkACgkQYx3nVTvo
r9RhVg//VhMXiJfed/n34t3IyScUax3Z4EZQeVupOHV1wxG4HKDzbUoDTpZyZhph
7qUI5CR4DX+cyL64rl9EM26Z3gsn8cXIXgGLTc+ev5KuEx1mW1hoY1pMVzmd1UNG
8rCeQgrs/O4GxScdrxYHuq1wF/SNQV4jqOFFjdFQG/9HHv+hj4Pfr+GK6cgWsCyT
0ctBmPMTArcRI11nj01X1d7VhbDCMEZl7j4teTbB2CADGCkwo05yLhMvirecg2T5
7oQXiAj3XRvhvDHogsOsleG2sKI4w+9xpNN6D/y9MFlFohbtPJYWR1BnrYZYnEom
KoEZzCHi6Sl9ZLxSH+LXMIhUULN1u6YWEW9N4g8dFT3e6EjXQLrP7rdeh1Wx9OO/
Mc1CT8RdovUCQjN7qWnu1Xtn4Q/27AsHoEf9CC3i4lAKbsXDWs9Z7/LFRg4ZFpb3
ZOGpUhe1IWJ5QhBkUp19ltOgFSCsJgf5ckxnXrgE24ZSxWuUEt0t8EVsd4Z8V0Zj
KQFyliklPQEiRdGlhb/DQsqKPro3Y/N7eDLutz9CtaCQ2L+LkGySfqrObMJ1zKhl
hzvpouDteft3Ppytbw2B/EMyXxuOaMHQQUngrtiEdADf7RRwOUO3sqN2TOfFyjnk
fpx5JKtl1r4xKmpn+Y12gQjAHPk1kG01ch2Rl+ZZDOVgPXv0vc4=
=Kgbh
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to