diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2016-03-12 11:38:00 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2016-03-12 11:38:00 +0100 |
commit | 7b3e9bcf000551ceb64a8607138e6d0125aea6c6 (patch) | |
tree | a9fb76d91765013627dd091fbb279b0bad3247b0 /src | |
parent | 96e4fa5995f461a1cd33c6313172133dc3f3a15b (diff) | |
download | 0xFFFF-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 ) |