Discussion:
[wish-info] Big bug fixes in 1.6.1
wsh
2003-03-06 18:20:09 UTC
Permalink
I know we don't use the mailing list very much but I wanted to get the word
out that a user found a big bug in the drivers that I have fixed in 1.6.1.
Since echo added a "\n" to every string, I arbitrarily lopped off the last
character of everything received. This broke C programs that tried to write
"ON" to the device because the N would be removed. Version 1.6.1 fixes this
by checking the last character and only takes it off if it is a control
character.

This one also has a pretty good enhancement to the state machine. I
realized that for the driver to really work well the state had to be local
to the file that was opened rather than using the global flags that I had
set up. This wasn't important previously because I never tried to watch the
same device with multiple programs. But, I realized that some of you might
want to do that. So, now I am fully utilizing the driver open and release
mechanisms to maintain state for each filehandle so that two applications
can read the same device. Previous versions would report a change to the
first device that cycled to check and would not report a change to the other
application.

The last enhancement in this release is that the /dev/x10/changed device was
previously updated to indicate that an entire housecode changed when ALL_ON
or ALL_OFF were received. This clouded the original intent of the changed
device which was to show what devices had been detected or changed since the
change device was last read. In any case, now, /dev/changed is only
modified when an individual address is seen. I should rename the device to
/dev/x10/detected.

Scott

P.S. I realize that you are all likely on the watch list on sourceforge so
if you find that getting the bug announcements on the info list to be
annoying, let me know and I will stop.

Loading...