From: Uwe Bonnes Date: Tue, 5 Jul 2011 16:03:26 +0000 (+0200) Subject: ftdi_usb_find_all: Only search for default devices if both VID AND PID are 0 X-Git-Tag: v1.0rc1~105 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=56631bed49236cc5f3c2b66da38eca5567867310 ftdi_usb_find_all: Only search for default devices if both VID AND PID are 0 --- diff --git a/src/ftdi.c b/src/ftdi.c index 4dc47bd..852b3ff 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -293,8 +293,10 @@ int ftdi_usb_find_all(struct ftdi_context *ftdi, struct ftdi_device_list **devli if (libusb_get_device_descriptor(dev, &desc) < 0) ftdi_error_return_free_device_list(-6, "libusb_get_device_descriptor() failed", devs); - if ((vendor != 0 && product != 0 && desc.idVendor == vendor && desc.idProduct == product) || - ((desc.idVendor == 0x403) && (desc.idProduct == 0x6001 || desc.idProduct == 0x6010 + if (((vendor != 0 && product != 0) && + desc.idVendor == vendor && desc.idProduct == product) || + ((vendor == 0 && product == 0) && + (desc.idVendor == 0x403) && (desc.idProduct == 0x6001 || desc.idProduct == 0x6010 || desc.idProduct == 0x6011 || desc.idProduct == 0x6014))) { *curdev = (struct ftdi_device_list*)malloc(sizeof(struct ftdi_device_list));