> You wrote on Thu, Jul 07, 2022 at 02:30:47PM +0100: > > if (desc.idVendor == vendor && desc.idProduct == product) > > { > > + open_counter++; > > if (libusb_open(dev, &ftdi->usb_dev) < 0) > > - ftdi_error_return_free_device_list(-4, "usb_open() > > failed", devs); > > + { > > + open_fail_counter++; > > + error_code = -4; > > + continue; > > + } > > why does the open_counter get increased before > and after libusb_open()?
A friendly soul pointed out to me off list that it's "open_counter" and "open_fail_counter" the second time. He also misread it the first time, so we should probably find a different name for those variables if the logic is going to stay. Cheers, Thomas -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com