WinCE: Don't confirm protocol stalls with device in wince_transfer_callback()
authorSimon Haggett <simon.haggett@realvnc.com>
Thu, 21 Feb 2013 16:59:00 +0000 (16:59 +0000)
committerPete Batard <pete@akeo.ie>
Fri, 22 Feb 2013 00:55:23 +0000 (00:55 +0000)
commite35c17b1d412b66a89138af7b403a09f9778a987
tree41f4d5ed528d9d9090af26f45d89e65422d696d8
parent76eecc6ce11d1bedee369859899901037dcd4cc2
WinCE: Don't confirm protocol stalls with device in wince_transfer_callback()

When wince_transfer_callback() observes a stall (io_result set to
ERROR_NOT_SUPPORTED), it checks with the device (by sending a GET_STATUS
control transfer) that the endpoint is really stalled. This check is not
suitable for protocol stalls as these are always cleared at the start of the
next control transfer. When a protocol stall occurs, wince_transfer_callback()
observes that the corresponding control endpoint does not remain stalled and so
forces io_result to ERROR_SUCCESS. This then prevents applications from
detecting that a control request was not supported by the device.

This patch prevents wince_transfer_callback() from attempting to confirm
protocol stalls with the device, allowing io_result to remain set to
ERROR_NOT_SUPPORTED. A couple of comments and a debug log message within
wince_transfer_callback() are also corrected.
libusb/os/wince_usb.c
libusb/version_nano.h