vpelletier / python-libusb1

Python ctype-based wrapper around libusb1
GNU Lesser General Public License v2.1
168 stars 65 forks source link

Fix getting of extra descriptors #49

Closed richardbarlow closed 5 years ago

richardbarlow commented 5 years ago

Also add a test to check that getting of extra descriptors works (requires a USB device with extra descriptors, such as a UVC webcam, which has at least one InterfaceAssociation descriptor).

vpelletier commented 5 years ago

Thanks, applied and tested with 2.7 and 3.7 on a machine which has devices exercising this codepath (sadly, travis doesn't, which hid a second breakage under python 2.7, which I fixed).

I also applied the same fix to the last place where buffer_at was used (last place which is not itself relied on by usb1 module, only exposed at libusb1 level for header completeness) and fixed a few more things.