Package: spectools
Version: 200902R1-2
Tags: patch

Hi Michael,

version 2009-02-R1 of spectools didn't work correctly with my
`wi-spy 2.4x': The GTK frontend was stuck in the `calibrating device'
phase while spectools_raw printed one line of data and then just sat
there doing nothing.

I found that the attached patch fixes the problem for me. It reverts a
change introduced between 2007-10-R2 and 2009-02-R1 (initialization of
some struct members got commented out) and adds a `memset' to make sure
memory is initialized before reading from it.

The problem exists in the current SVN version, revision 2789.

Version in the Debian package, package version 200902R1-2, suffers from
the same problem. I did not try the Lenny package, package version
200710R2-2. A bug report has been opened with this email.

If you need further information, please don't hesitate to contact me.
Thank you for spectools :)

Regards,
-octo

P. S.: I don't know of any mailing list to contact. If there is one,
       please feel free to forward this message accordingly.
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
diff -pur spectools-2009-02-R1.orig/wispy_hw_24x.c spectools-2009-02-R1.octo/wispy_hw_24x.c
--- spectools-2009-02-R1.orig/wispy_hw_24x.c	2009-01-27 05:10:14.000000000 +0100
+++ spectools-2009-02-R1.octo/wispy_hw_24x.c	2009-05-15 19:44:43.000000000 +0200
@@ -860,6 +860,7 @@ int wispy24x_usb_setposition(wispy_phy *
 		free(phydev->device_spec->supported_ranges);
 	phydev->device_spec->supported_ranges = 
 		(wispy_sample_sweep *) malloc(WISPY_SWEEP_SIZE(0));
+	memset (phydev->device_spec->supported_ranges, 0, WISPY_SWEEP_SIZE(0));
 
 	/* Set the universal values */
 	phydev->device_spec->supported_ranges[0].num_samples = WISPY24x_USB_NUM_SAMPLES;
@@ -869,7 +870,6 @@ int wispy24x_usb_setposition(wispy_phy *
 	phydev->device_spec->supported_ranges[0].rssi_max = WISPY24x_USB_RSSI_MAX;
 
 	/* Set the sweep records based on default or new data */
-	/*
 	if (start_khz == 0) {
 		phydev->device_spec->supported_ranges[0].start_khz = WISPY24x_USB_DEF_H_MINKHZ;
 		phydev->device_spec->supported_ranges[0].end_khz = 
@@ -882,7 +882,6 @@ int wispy24x_usb_setposition(wispy_phy *
 			start_khz + ((WISPY24x_USB_NUM_SAMPLES * res_hz) / 1000);
 		phydev->device_spec->supported_ranges[0].res_hz = res_hz;
 	}
-	*/
 
 	/* We're not configured, so we need to push a new configure block out next time
 	 * we sweep */

Attachment: signature.asc
Description: Digital signature

Reply via email to