Hi,

  I'm about to upload a NMU to fix this bug, patch attached.

  Thanks,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Capitalism is the extraordinary belief that the nastiest of men, for the
nastiest of reasons, will somehow work for the benefit of us all.
                -- John Maynard Keynes
diff -u bwm-1.1.0/debian/changelog bwm-1.1.0/debian/changelog
--- bwm-1.1.0/debian/changelog
+++ bwm-1.1.0/debian/changelog
@@ -1,3 +1,16 @@
+bwm (1.1.0-8.1) unstable; urgency=low
+
+  * The "Never trust your tools, or risk loosing hours of your life" NMU.
+
+  * Really fix bandwith miscalculation when bytes_transmitted_over_period
+    is greater than MAX_LONG/1000, by applying the provided patch with a
+    non-dyslexic /usr/bin/patch. (Closes: #132453)
+
+  * While at it, correct the broken fix for #142701 with the patch provided
+    by [EMAIL PROTECTED]
+
+ -- Adeodato Simó <[EMAIL PROTECTED]>  Wed, 25 Jan 2006 19:20:18 +0100
+
 bwm (1.1.0-8) unstable; urgency=low
 
   * Sorrowly upstream seems lost, so accepting patches :(
diff -u bwm-1.1.0/bwm.c bwm-1.1.0/bwm.c
--- bwm-1.1.0/bwm.c
+++ bwm-1.1.0/bwm.c
@@ -91,11 +91,12 @@
 
   while(1)
   {
-    if (inum=oldinum)
+    if (inum==oldinum)
     {
       printf("%c[H",27);
     } else {
       printf("%c[H%c[J",27,27);
+      oldinum = inum;
     }
     printf("Bandwidth Monitor 1.1.0\n\n");
     printf("       Iface        RX(KB/sec)   TX(KB/sec)   Total(KB/sec)\n\n");
@@ -144,7 +145,7 @@
 
               interface[inum].rx_kbytes_dif =
                (interface[inum].rx_bytes_new -
-                interface[inum].rx_bytes_old) * 1024 / 1000;
+                interface[inum].rx_bytes_old) / 1024 * 1000;
 
               interface[inum].rx_rate_whole = 
                interface[inum].rx_kbytes_dif / 
@@ -163,7 +164,7 @@
 
               interface[inum].tx_kbytes_dif =
                (interface[inum].tx_bytes_new -
-                interface[inum].tx_bytes_old) * 1024 / 1000;
+                interface[inum].tx_bytes_old) / 1024 * 1000;
 
               interface[inum].tx_rate_whole = 
                interface[inum].tx_kbytes_dif / 
@@ -254,7 +255,6 @@
 
     sleep(sleep_time);
     first_pass = 0;
-    oldinum = inum;
   }
 
   exit(EXIT_SUCCESS);

Reply via email to