commit | b89ea940953e9391326712f743ef7fea59e87a06 | [log] [tgz] |
---|---|---|
author | Richard Low <richard@wentnet.com> | Tue Jan 02 11:47:19 2007 +0000 |
committer | Richard Low <richard@wentnet.com> | Tue Jan 02 11:47:19 2007 +0000 |
tree | e89cf3357e17845c5caddfd7e1b61cc570416997 | |
parent | c70a6dfb36698ac053a290d2decbb1c18646ec4a [diff] [blame] |
split header/packet sizes fixes
diff --git a/src/libusb-glue.c b/src/libusb-glue.c index 86debd6..8d60b77 100644 --- a/src/libusb-glue.c +++ b/src/libusb-glue.c
@@ -418,6 +418,8 @@ toread = size - curread; if (toread > CONTEXT_BLOCK_SIZE) toread = CONTEXT_BLOCK_SIZE; + else if (toread > ptp_usb->outep_maxpacket) + toread -= toread % ptp_usb->outep_maxpacket; result = USB_BULK_READ(ptp_usb->handle, ptp_usb->inep, (char*)bytes, toread, ptpcam_usb_timeout); if (result == 0) {