diff options
author | Hector Martin | 2009-09-20 19:18:15 +0200 |
---|---|---|
committer | Hector Martin | 2009-10-03 17:16:24 +0200 |
commit | 8ea6dc804457d3ad02b5bc2017007f965359d8c5 (patch) | |
tree | fb08beb66949691bc6fddb56c2de1a0d0d377f74 /daemon/usb-linux.c | |
parent | e619fc9e4d90c9e86d1e05fe37ad6fbf284d6de8 (diff) | |
download | usbmuxd-8ea6dc804457d3ad02b5bc2017007f965359d8c5.tar.gz usbmuxd-8ea6dc804457d3ad02b5bc2017007f965359d8c5.tar.bz2 |
Require libusb-1.0.3 and hardcode explicit ZLP logic
1.0.3 has the 0-byte transaction fix. The saga
continues on the libusb trac. Whenever they add the
ZLP flag we can get rid of the 0-byte logic and just
set it.
Diffstat (limited to 'daemon/usb-linux.c')
-rw-r--r-- | daemon/usb-linux.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/daemon/usb-linux.c b/daemon/usb-linux.c index f1be612..0edc557 100644 --- a/daemon/usb-linux.c +++ b/daemon/usb-linux.c @@ -134,18 +134,12 @@ int usb_send(struct usb_device *dev, const unsigned char *buf, int length) struct libusb_transfer *xfer = libusb_alloc_transfer(0); libusb_fill_bulk_transfer(xfer, dev->dev, BULK_OUT, (void*)buf, length, tx_callback, dev, 0); xfer->flags = LIBUSB_TRANSFER_SHORT_NOT_OK; -#ifndef EXPLICIT_ZLP_TRANSACTION - if (length % dev->wMaxPacketSize == 0) { - xfer->flags |= LIBUSB_TRANSFER_ZERO_PACKET; - } -#endif if((res = libusb_submit_transfer(xfer)) < 0) { usbmuxd_log(LL_ERROR, "Failed to submit TX transfer %p len %d to device %d-%d: %d", buf, length, dev->bus, dev->address, res); libusb_free_transfer(xfer); return res; } collection_add(&dev->tx_xfers, xfer); -#ifdef EXPLICIT_ZLP_TRANSACTION if (length % dev->wMaxPacketSize == 0) { usbmuxd_log(LL_DEBUG, "Send ZLP"); // Send Zero Length Packet @@ -160,7 +154,6 @@ int usb_send(struct usb_device *dev, const unsigned char *buf, int length) } collection_add(&dev->tx_xfers, xfer); } -#endif return 0; } |