From: Romain <ro...@li...> - 2006-08-01 12:00:10
|
Hi Ben, thanks you for the bug report. I have merged it. roms. Benjamin Moody a =E9crit : > Hi everybody, > > I found a couple of minor problems with the SilverLink/DUSB on Linux in > libticables2 0.1.2, which occur when there is an error trying to read d= ata > from the cable. > > First, the error message says 'usb_bulk_write' rather than > 'usb_bulk_read'. Yes, I know it doesn't actually use usb_bulk_read on > Linux, but it's a close approximation. :) > > More importantly, slv_get() doesn't stop when an error occurs, and it > always returns 0. > > Patch: > --- linux/link_slv.c~ 2006-07-03 07:10:11.000000000 -0400 > +++ linux/link_slv.c 2006-07-30 16:32:30.000000000 -0400 > @@ -673,19 +673,19 @@ > > if(ret =3D=3D -ETIMEDOUT) > { > - ticables_warning("usb_bulk_write (%s).\n", usb_strerror()); > + ticables_warning("usb_bulk_read (%s).\n", usb_strerror()); > nBytesRead =3D 0; > return ERR_READ_TIMEOUT; > } > else if(ret =3D=3D -EPIPE) > { > - ticables_warning("usb_bulk_write (%s).\n", usb_strerror()); > + ticables_warning("usb_bulk_read (%s).\n", usb_strerror()); > nBytesRead =3D 0; > return ERR_READ_ERROR; > } > else if(ret < 0) > { > - ticables_warning("usb_bulk_write (%s).\n", usb_strerror()); > + ticables_warning("usb_bulk_read (%s).\n", usb_strerror()); > nBytesRead =3D 0; > return ERR_READ_ERROR; > } > @@ -707,7 +707,7 @@ > // we can't do that in any other way because slv_get_ can returns > // 1, 2, ..., len bytes. > for(i =3D 0; i < len; i++) > - slv_get_(h, data+i); > + TRYC(slv_get_(h, data+i)); > > return 0; > } > > Benjamin Moody > > > -----------------------------------------------------------------------= -- > 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > TiLP-devel mailing list > TiL...@li... > https://lists.sourceforge.net/lists/listinfo/tilp-devel > --=20 Romain Li=E9vin : <ro...@li...> Web site : http://www.lievin.net "Linux, y'a moins bien mais c'est plus cher !" |