tags 426300 patch
thanks

The following works around the dBm problem. For a better solution,
look at the code of wmwave. The assumption is that stat->signal and
stat->noise are signed 8 bit values when IW_QUAL_DBM is not set.

The patch to iw_if.h is to allow compilation against kernel headers
from 2.6.20 and later, to avoid problems when the
linux-kernel-headers package is updated.

The patch against ui.c is a workaround for #229106.

I have not made an NMU, despite what the changelog says.

-- 
Paul Martin <[EMAIL PROTECTED]>
diff -ur wavemon-0.4.0b/debian/changelog wavemon-0.4.0b-pm/debian/changelog
--- wavemon-0.4.0b/debian/changelog	2007-06-16 16:04:03.000000000 +0100
+++ wavemon-0.4.0b-pm/debian/changelog	2007-06-16 15:50:26.888886632 +0100
@@ -1,3 +1,10 @@
+wavemon (0.4.0b-9.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix of #426300 and #229106.
+
+ -- Paul Martin <[EMAIL PROTECTED]>  Sat, 16 Jun 2007 15:49:58 +0100
+
 wavemon (0.4.0b-9) unstable; urgency=low
 
   * rebuild against new linux-kernel-headers (closes: #328442)
diff -ur wavemon-0.4.0b/iw_if.c wavemon-0.4.0b-pm/iw_if.c
--- wavemon-0.4.0b/iw_if.c	2007-06-16 16:19:37.937442114 +0100
+++ wavemon-0.4.0b-pm/iw_if.c	2007-06-16 16:19:25.937107329 +0100
@@ -420,7 +420,7 @@
             memset(buf, 0, sizeof(buf));
             strncpy(buf, lp, strcspn(lp, ". "));
             sscanf(buf, "%d", &stat->signal);
-            stat->signal -= 0x100;
+            if (stat->signal > 0x80) stat->signal -= 0x100;
             if (random) stat->signal = rnd_signal(-102, 10);
             avg_signal += stat->signal / (float)slotsize;
             lp += strlen(buf);
@@ -430,7 +430,7 @@
             memset(buf, 0, sizeof(buf));
             strncpy(buf, lp, strcspn(lp, ". "));
             sscanf(buf, "%d", &stat->noise);
-            stat->noise -= 0x100;
+            if (stat->noise > 0x80) stat->noise -= 0x100;
             if (random) stat->noise = rnd_noise(-102, -30);
             avg_noise += stat->noise / (float)slotsize;
             lp += strlen(buf);
diff -ur wavemon-0.4.0b/iw_if.h wavemon-0.4.0b-pm/iw_if.h
--- wavemon-0.4.0b/iw_if.h	2007-06-16 16:19:37.937442114 +0100
+++ wavemon-0.4.0b-pm/iw_if.h	2007-06-16 16:19:25.937107329 +0100
@@ -19,6 +19,8 @@
  */
 
 #include <netdb.h>
+#include <linux/types.h>
+#include <linux/if.h>
 #include <linux/wireless.h>
 
 #define IW_STACKSIZE 1024
diff -ur wavemon-0.4.0b/ui.c wavemon-0.4.0b-pm/ui.c
--- wavemon-0.4.0b/ui.c	2007-06-16 16:19:37.937442114 +0100
+++ wavemon-0.4.0b-pm/ui.c	2007-06-16 16:19:25.937107329 +0100
@@ -99,7 +99,7 @@
 
 	for (c = 0; c < steps / (float)(maxv - minv) * (val - minv); c++)
 		if (c < COLS -2) mvwaddch(win, y, x + c, '=' | A_BOLD | COLOR_PAIR(col));
-	while (x + c < maxx) mvwaddch(win, y, x + c++, 183);
+	while (x + c < maxx) mvwaddch(win, y, x + c++, '.');
 }
 
 void waddthreshold(WINDOW *win, float v, float tv, float minv, float maxv, char y, char x, char maxx, char *cscale, char rev, char tch)

Reply via email to