fix BUG-271
This commit is contained in:
parent
bc273e1aa0
commit
8c722521ee
|
@ -834,7 +834,13 @@ int usb_device::transfer_bulk(unsigned endpoint, unsigned char* data, int* lengt
|
|||
{
|
||||
GetOverlappedResult(h, oc->over_lapped(), oc->io_bytes(), FALSE);
|
||||
*length = *oc->io_bytes();
|
||||
ret = LIBUSB_SUCCESS;
|
||||
if (*length == 0 && oc->over_lapped()->Internal != ERROR_SUCCESS)
|
||||
{
|
||||
ret = LIBUSB_ERROR_IO;
|
||||
VLOG_MINI_2(LOG_LEVEL_WARNING, "Bulk-Transfer of endpoint 0x%02x failed with code 0x%08X\n", endpoint, oc->over_lapped()->Internal);
|
||||
}
|
||||
else
|
||||
ret = LIBUSB_SUCCESS;
|
||||
}
|
||||
else
|
||||
ret = LIBUSB_ERROR_TIMEOUT;
|
||||
|
|
Loading…
Reference in New Issue