summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/CMakeLists.txt19
-rw-r--r--daemon/usb-linux.c7
2 files changed, 0 insertions, 26 deletions
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
index e5f9b11..8a5c417 100644
--- a/daemon/CMakeLists.txt
+++ b/daemon/CMakeLists.txt
@@ -6,25 +6,6 @@ include_directories (${CMAKE_SOURCE_DIR}/common)
include_directories (${CMAKE_SOURCE_DIR}/daemon)
include_directories (${CMAKE_SOURCE_DIR}/libusbmuxd)
-include(CheckConstantExists)
-set(CMAKE_REQUIRED_INCLUDES ${USB_INCLUDE_DIRS})
-check_constant_exists(LIBUSB_TRANSFER_ZERO_PACKET libusb.h HAVE_LIBUSB_ZLP)
-
-if(NOT HAVE_LIBUSB_ZLP)
- message("
-================================================================================
-==================================== WARNING ===================================
-================================================================================
-Your libusb is missing proper Zero Length Packet support! If you are using a
-recent libusb Git, things may or may not work. If you are using libusb 1.0.2 or
-earlier, things will definitely not work properly.
-
-Please apply the patch in the contrib/ directory to your libusb 1.0 tree.
-================================================================================
-")
- add_definitions(-DEXPLICIT_ZLP_TRANSACTION)
-endif(NOT HAVE_LIBUSB_ZLP)
-
add_definitions(-Wall -O2 -g -DUSBMUXD_DAEMON -DUSBMUXD_VERSION="${USBMUXD_VERSION}")
add_executable(usbmuxd main.c usb-linux.c log.c ../common/utils.c device.c client.c)
target_link_libraries(usbmuxd ${LIBS})
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;
}