Quoting Fenix (fenix...@gmail.com): > > Hi. > > > I have fixed this. There were two problems in usb_comm.c when the update > to libusb1.0: > > > 1) It seems libusb1.0 changes the addres of the endpoint to talk to. The > code made a bit operation that makes the device unachievable. > > 2) There were core code of libusb that only was execute with the -v > (verbose) option, because an incorrect conditional anidation. > > > The patch I attach fix the two problems and works for me (now with > libusb1.0 :P). I have tested garmin_get_info, garmin_save_runs and > garmin_gpx. If you need more information about this fix, please, feel free > to ask.
It builds fine. Still, there are a few chunks in the patch that look like noise to me. For instance: > diff --git a/src/usb_comm.c b/src/usb_comm.c > index f00f6d9..9c5afa3 100644 > --- a/src/usb_comm.c > +++ b/src/usb_comm.c > @@ -72,9 +72,8 @@ garmin_open ( garmin_unit * garmin ) > } > } > cnt = libusb_get_device_list(ctx,&dl); > - > + .../... > @@ -97,22 +96,28 @@ garmin_open ( garmin_unit * garmin ) > if ( err ) { > printf("libusb_open failed: %s\n",libusb_error_name(err)); > garmin->usb.handle = NULL; > - } else if ( garmin->verbose != 0 ) { > - printf("[garmin] libusb_open = %p\n",garmin->usb.handle); > + } else { > + if ( garmin->verbose != 0 ) { > + printf("[garmin] libusb_open = %p\n",garmin->usb.handle); > + } I'm not really skilled in C, but isn't that just cosmetic? > > - err = libusb_set_configuration(garmin->usb.handle,1); > + err = libusb_set_configuration(garmin->usb.handle,1); Ditto > if ( err ) { > - printf("libusb_set_configuration failed: %s\n", > + printf("libusb_set_configuration failed: %s\n", Ditto And so on.... I'd be happy to apply the patch, of course, but do you think that it can be "cleaned"? I can try to do it myself but......I'm a bit afraid to break things doing so.
signature.asc
Description: PGP signature