summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2011-09-27 00:02:53 +0200
committerGravatar Martin S2012-01-14 21:35:53 +0100
commit5ae8d057300a7dc9a5d567656e8b338a8989478d (patch)
treef0aaedb0e209f5043d06fb843518ca49f7ba4555
parent8968476bb5262d8aef20cb199337b174d338beb8 (diff)
downloadusbmuxd-5ae8d057300a7dc9a5d567656e8b338a8989478d.tar.gz
usbmuxd-5ae8d057300a7dc9a5d567656e8b338a8989478d.tar.bz2
Fix detection for Apple TV 2 due to small interface detection bug
-rw-r--r--daemon/usb-linux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/usb-linux.c b/daemon/usb-linux.c
index c9d4629..334d967 100644
--- a/daemon/usb-linux.c
+++ b/daemon/usb-linux.c
@@ -352,15 +352,17 @@ int usb_discover(void)
usbmuxd_log(LL_WARNING, "Endpoint type mismatch for interface %d of device %d-%d", intf->bInterfaceNumber, bus, address);
}
}
- libusb_free_config_descriptor(config);
if(j == config->bNumInterfaces) {
usbmuxd_log(LL_WARNING, "Could not find a suitable USB interface for device %d-%d", bus, address);
+ libusb_free_config_descriptor(config);
libusb_close(handle);
free(usbdev);
continue;
}
+ libusb_free_config_descriptor(config);
+
if((res = libusb_claim_interface(handle, usbdev->interface)) != 0) {
usbmuxd_log(LL_WARNING, "Could not claim interface %d for device %d-%d: %d", usbdev->interface, bus, address, res);
libusb_close(handle);