Windows: Direct control requests to a specific interface when possible
authorChris Dickens <christopher.a.dickens@gmail.com>
Tue, 6 Jan 2015 04:47:47 +0000 (20:47 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Tue, 6 Jan 2015 05:08:29 +0000 (21:08 -0800)
commit0f8c332a2d692542f855d660024684eaa0f6de5a
tree45cfa5641511e51e03c15b7b26c1d219f0c66957
parent4c28cd8593cbbca234a1fa0b9b84f4356fd00796
Windows: Direct control requests to a specific interface when possible

Control requests on composite devices for Windows is tricky, because not
all APIs are able to correctly process all types of requests. To improve
robustness, this change checks whether the control request recipient is
an interface or endpoint. If it is either, the control request will be
attempted against that interface's API first.

Additionally, when cycling through the interfaces to find a working API,
it will no longer fail if that API does not support the specific type of
control request because there is a chance that another API will succeed.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/windows_usb.c
libusb/version_nano.h