summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2016-03-12 11:38:00 +0100
committerPali Rohár <pali.rohar@gmail.com>2016-03-12 11:38:00 +0100
commit7b3e9bcf000551ceb64a8607138e6d0125aea6c6 (patch)
treea9fb76d91765013627dd091fbb279b0bad3247b0 /src
parent96e4fa5995f461a1cd33c6313172133dc3f3a15b (diff)
download0xFFFF-7b3e9bcf000551ceb64a8607138e6d0125aea6c6.tar.bz2
mkii: Use libusb_get_active_config_descriptor() instead libusb_get_config_descriptor()
This will fix problem that it was used incorrect config index
Diffstat (limited to 'src')
-rw-r--r--src/mkii.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mkii.c b/src/mkii.c
index a3766a2..7e307b8 100644
--- a/src/mkii.c
+++ b/src/mkii.c
@@ -160,7 +160,7 @@ int mkii_init(struct usb_device_info * dev) {
memset(buf, 0, sizeof(buf));
udev = libusb_get_device(dev->udev);
- ret = libusb_get_config_descriptor(udev, dev->flash_device->configuration, &desc);
+ ret = libusb_get_active_config_descriptor(udev, &desc);
if ( ret == 0 )
libusb_get_string_descriptor_ascii(dev->udev, desc->iConfiguration, (unsigned char*)buf, sizeof(buf));
if ( strncmp(buf, "Firmware Upgrade Configuration", sizeof("Firmware Upgrade Configuration")) == 0 )