fix BUG-271
This commit is contained in:
parent
bc273e1aa0
commit
8c722521ee
|
@ -834,6 +834,12 @@ int usb_device::transfer_bulk(unsigned endpoint, unsigned char* data, int* lengt
|
||||||
{
|
{
|
||||||
GetOverlappedResult(h, oc->over_lapped(), oc->io_bytes(), FALSE);
|
GetOverlappedResult(h, oc->over_lapped(), oc->io_bytes(), FALSE);
|
||||||
*length = *oc->io_bytes();
|
*length = *oc->io_bytes();
|
||||||
|
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;
|
ret = LIBUSB_SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue