continue;
}
- usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
-
libusb_close(hdl);
+ if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+ continue;
+
if (!strcmp(product, "ChronoVu LA8"))
model = 0;
else if (!strcmp(product, "ChronoVu LA16"))
goto err_ftdi_free;
}
- if ((ret = ftdi_usb_purge_buffers(devc->ftdic)) < 0) {
+ if ((ret = PURGE_FTDI_BOTH(devc->ftdic)) < 0) {
sr_err("Failed to purge FTDI buffers (%d): %s.",
ret, ftdi_get_error_string(devc->ftdic));
goto err_ftdi_free;