Looks good to me - pushed. I added some parenthesis around the new test, as I know some compilers will complain (possibly in pedantic mode) about ensuring to clarify that the test is as intended, and not just a result of unexpected operator precedence.
Regards, /Pete PS: I screwed up the ticket reference in the commit message - used libusb's 142 instead of our 82. Oh well... #82 has now been (manually) closed. On 2013.02.11 15:24, Xiaofan Chen wrote: > On Mon, Feb 11, 2013 at 11:21 PM, Hans de Goede <hdego...@redhat.com> wrote: >> This fixes; https://libusb.org/ticket/142 >> >> Signed-off-by: Hans de Goede <hdego...@redhat.com> >> --- >> libusb/os/linux_usbfs.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c >> index 0ca02e1..d18d009 100644 >> --- a/libusb/os/linux_usbfs.c >> +++ b/libusb/os/linux_usbfs.c >> @@ -1787,7 +1787,7 @@ static int submit_bulk_transfer(struct usbi_transfer >> *itransfer, >> urb->type = urb_type; >> urb->endpoint = transfer->endpoint; >> urb->buffer = transfer->buffer + (i * bulk_buffer_len); >> - if (use_bulk_continuation && !is_out) >> + if (use_bulk_continuation && !is_out && i != num_urbs - 1) >> urb->flags = USBFS_URB_SHORT_NOT_OK; >> if (i == num_urbs - 1 && last_urb_partial) >> urb->buffer_length = transfer->length % >> bulk_buffer_len; >> -- >> 1.8.1.2 >> > > Nice. Created a libusbx ticket to capture this one so it can go into 1.0.15. > https://github.com/libusbx/libusbx/issues/82 > ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel