From: Marek Antoniak Date: Fri, 3 Dec 2021 12:50:21 +0000 (+0100) Subject: chronovu-la: Add checking of VendorId X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=64414853067e727f99c7d41851ac635d4342f17b;p=libsigrok.git chronovu-la: Add checking of VendorId --- diff --git a/src/hardware/chronovu-la/api.c b/src/hardware/chronovu-la/api.c index d35a4f53..53c94fdd 100644 --- a/src/hardware/chronovu-la/api.c +++ b/src/hardware/chronovu-la/api.c @@ -20,6 +20,8 @@ #include #include "protocol.h" +#define CHRONOVU_VENDOR (0x0403) + static const uint32_t scanopts[] = { SR_CONF_CONN, }; @@ -169,6 +171,11 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) libusb_get_device_descriptor(devlist[i], &des); + /* See https://sigrok.org/bugzilla/show_bug.cgi?id=1115 and + * https://github.com/sigrokproject/libsigrok/pull/166 */ + if (des.idVendor != CHRONOVU_VENDOR) + continue; + if ((ret = libusb_open(devlist[i], &hdl)) < 0) continue;