Windows: Fix timeouts if only endpoint 0 exists
authorJulian Scheel <julian@jusst.de>
Mon, 8 Jun 2020 12:32:16 +0000 (14:32 +0200)
committerTormod Volden <debian.tormod@gmail.com>
Sun, 7 Nov 2021 11:58:15 +0000 (12:58 +0100)
commit7b342030d293019696ff536a95105c654167461a
tree16d98b15a4e6d4810fe541623feee0e1819e191e
parent3178abb79093231f46d7fa544335a58ddd58a324
Windows: Fix timeouts if only endpoint 0 exists

The default timeouts of 5 seconds used by WinUSB are cleared in
configure_endpoints(). This was not called if not at least one extra
endpoint apart from endpoint 0 existed, so that in those cases the
default timeout of 5 seconds remained in place.
Fix this by calling configure_endpoints, even if no interface specific
endpoints were found, so that it can configure endpoint 0.

Closes #963

Signed-off-by: Julian Scheel <julian@jusst.de>
[Tormod: Refactored to reduce duplicated code]
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
libusb/os/windows_winusb.c
libusb/version_nano.h