From: Christian M. <ma...@ma...> - 2007-10-01 12:35:36
|
I should perhaps tell you that it has always been able to open multiple connections at the same time. OW::init("-u -s 192.168.3.1:3001 --fake 10") This will result into /bus.0 /bus.1 /bus.2 directories where you can = address each connection if you like. The root-directory will show ALL devices found from all connection. /Christian > -----Original Message----- > From: owf...@li... [mailto:owfs-cvs- > bo...@li...] On Behalf Of Thomas Gr=FCnberg > Sent: den 30 september 2007 16:16 > To: owf...@li... > Subject: [Owfs-cvs] Using OW.pm in a loop fails with : Compilation > segmentation fault >=20 > Hi everybody, >=20 > I try to get data from different OW sources (tty, usb, and a NSLUG > running > owserver) using the perl module 0W.pm (version from owfs-2.6p6) >=20 > If I use OW.pm to select one of the ow-sources, everything works fine. >=20 > But if I use: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D snip = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > foreach my $OWSource (@OWSources) > {OW::init($OWSource); > $log->debug("OWInit von OWSource =3D> $OWSource"); >=20 > my $BusData =3D OW::get("/") or return ; > $log->debug("Busdaten: $BusData"); >=20 > OW::finish(); > $log->debug(" OWFinish "); > sleep 2; > } > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D snap = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > I get: Compilation segmentation fault >=20 > and in the log-file: >=20 > 2007/09/30 16:03:10 DEBUG> segfaulttest.pl:151 main:: - OWFS-Sources = =3D> > 192.168.0.22:3002 u0 > 2007/09/30 16:03:10 DEBUG> segfaulttest.pl:168 main:: - OWInit von > OWSource =3D> > 192.168.0.22:3002 > 2007/09/30 16:03:11 DEBUG> segfaulttest.pl:171 main:: - Busdaten: > = structure/,bus.0/,uncached/,settings/,system/,statistics/,10.CCFD240108 > = 00/,10.A20425010800/,10.019125010800/,10.717A25010800/,10.E99225010800/ > = ,10.E78925010800/,10.177125010800/,10.77FE24010800/,10.8FB950000800/,10 > .1F232C000800/,10.5F2525010800/,81.D64928000000/,alarm/,simultaneous/ > 2007/09/30 16:03:11 DEBUG> segfaulttest.pl:175 main:: - OWFinish > 2007/09/30 16:03:13 DEBUG> segfaulttest.pl:168 main:: - OWInit von > OWSource =3D> > u0 >=20 > So it crashes when it tries to initialise OW::init($OWSource) with the > second > ow-source. >=20 > Did I misunderstand the use ow OW.pm ? Is it possible to give OW.pm a > list of > sources to initialise ? (tried it, but no avail) >=20 > Help very welcome ! > Thomas >=20 >=20 > = ----------------------------------------------------------------------- > -- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Owfs-cvs mailing list > Owf...@li... > https://lists.sourceforge.net/lists/listinfo/owfs-cvs |