Windows: Fix possible false error message during device enumeration
authorChris Dickens <christopher.a.dickens@gmail.com>
Wed, 14 Sep 2016 05:09:50 +0000 (22:09 -0700)
committerNathan Hjelm <hjelmn@me.com>
Sat, 1 Oct 2016 12:59:11 +0000 (06:59 -0600)
commit9bf44223d4c0eabbfbf8f9e979767fe424008ec0
tree16b527975845968eb8c087e93a553f9115120c23
parent4eca418ef50dcaf3f2fca11158410acd72e8e2e2
Windows: Fix possible false error message during device enumeration

During early phases of enumeration, it is possible for a device to be
enumerated before its parent. When this occurs, the device assigned as
the parent will actually be a grandparent. During later phases of
enumeration, the parent device will in fact exist but will not match
what has already been assigned to the device.

This commit adds code to check for and update the parent device when
this situation occurs.

Closes #206

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