Hi all,
I finally could experiment a bit with last week's CVS and owtcl.
Unfortunately, it breaks on scanning a specific bus when no key is connected.
janskiste:~ # tclsh
% package require ow
0.1
% OW::init /dev/i2c-1
% OW::get uncached
bus.7/,bus.6/,bus.5/,bus.4/,bus.3/,bus.2/,bus.1/,bus.0/
% OW::get bus.0/uncached
Segmentation fault
Now I put an ibutton to the bus.0
janskiste:~ # tclsh
% package require ow
0.1
% OW::init /dev/i2c-1
% OW::get uncached
bus.7/,bus.6/,bus.5/,bus.4/,bus.3/,bus.2/,bus.1/,bus.0/,01.7ABFA6080000/
% OW::get bus.0/uncached
01.7ABFA6080000/
%
As I found out, it's a owtcl problem with zero-sized replies from owlib.
Proposed patch:
--- module/swig/tcl/ow.c.orig 2006-12-04 17:55:23.000000000 +0100
+++ module/swig/tcl/ow.c 2006-12-04 18:56:02.000000000 +0100
@@ -187,6 +187,11 @@
goto common_exit;
}
+ if (buf==NULL) {
+ tcl_return = TCL_OK;
+ goto common_exit;
+ }
+
buf[s] = 0;
if (lst) {
if (strchr(buf, ',')) {
Kind regards
Jan
--
You have acquired a scroll entitled 'irk gleknow mizk'(n).--More--
This is an IBM Manual scroll.--More--
You are permanently confused.
-- Dave Decot
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers