]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/chronovu-la/api.c
korad-kaxxxxp: use ID text prefix with optional version for RND models
[libsigrok.git] / src / hardware / chronovu-la / api.c
index fb35879fb3e000f690ce27cbfe2fc0d35e2b01ed..d35a4f5377d2b8d8bc943cfbf893b2a043340444 100644 (file)
@@ -194,7 +194,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
                libusb_close(hdl);
 
-               usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
+               if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+                       continue;
 
                if (!strcmp(product, "ChronoVu LA8"))
                        model = 0;
@@ -242,7 +243,7 @@ static int dev_open(struct sr_dev_inst *sdi)
                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;