Windows: WinUSB: Allow caching config descriptors to fail
authorChris Dickens <christopher.a.dickens@gmail.com>
Sat, 17 Mar 2018 07:15:20 +0000 (00:15 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Sat, 17 Mar 2018 07:15:20 +0000 (00:15 -0700)
commit2da989c2a0f632fbcaa3696087fbbc57181443c1
treedd6980e39c0fb4762116b574d0453c24ec16defe
parent0aac390bb261ee693f3364dd9a83267c2f0b619b
Windows: WinUSB: Allow caching config descriptors to fail

Certain buggy devices may not provide all the advertised configuration
descriptors. Prior to this commit, failure to cache any one of the
descriptors would result in all of the descriptors being freed and the
device being inaccessible. Work around this by continuing on if fetching
a configuration descriptor fails. The device may still be usable if the
descriptor for the current configuration was successfully retrieved.

Closes #390

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