]> sigrok.org Git - libsigrok.git/commitdiff
chronovu-la: Add checking of VendorId
authorMarek Antoniak <redacted>
Fri, 3 Dec 2021 12:50:21 +0000 (13:50 +0100)
committerSoeren Apel <redacted>
Wed, 27 Sep 2023 21:43:04 +0000 (23:43 +0200)
src/hardware/chronovu-la/api.c

index d35a4f5377d2b8d8bc943cfbf893b2a043340444..53c94fdd179e4c82b329314d316e96a78e5dcdd9 100644 (file)
@@ -20,6 +20,8 @@
 #include <config.h>
 #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;