summaryrefslogtreecommitdiffstats
path: root/daemon
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 /daemon
parent8968476bb5262d8aef20cb199337b174d338beb8 (diff)
downloadusbmuxd-5ae8d057300a7dc9a5d567656e8b338a8989478d.tar.gz
usbmuxd-5ae8d057300a7dc9a5d567656e8b338a8989478d.tar.bz2
Fix detection for Apple TV 2 due to small interface detection bug
Diffstat (limited to 'daemon')
-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)
352 usbmuxd_log(LL_WARNING, "Endpoint type mismatch for interface %d of device %d-%d", intf->bInterfaceNumber, bus, address); 352 usbmuxd_log(LL_WARNING, "Endpoint type mismatch for interface %d of device %d-%d", intf->bInterfaceNumber, bus, address);
353 } 353 }
354 } 354 }
355 libusb_free_config_descriptor(config);
356 355
357 if(j == config->bNumInterfaces) { 356 if(j == config->bNumInterfaces) {
358 usbmuxd_log(LL_WARNING, "Could not find a suitable USB interface for device %d-%d", bus, address); 357 usbmuxd_log(LL_WARNING, "Could not find a suitable USB interface for device %d-%d", bus, address);
358 libusb_free_config_descriptor(config);
359 libusb_close(handle); 359 libusb_close(handle);
360 free(usbdev); 360 free(usbdev);
361 continue; 361 continue;
362 } 362 }
363 363
364 libusb_free_config_descriptor(config);
365
364 if((res = libusb_claim_interface(handle, usbdev->interface)) != 0) { 366 if((res = libusb_claim_interface(handle, usbdev->interface)) != 0) {
365 usbmuxd_log(LL_WARNING, "Could not claim interface %d for device %d-%d: %d", usbdev->interface, bus, address, res); 367 usbmuxd_log(LL_WARNING, "Could not claim interface %d for device %d-%d: %d", usbdev->interface, bus, address, res);
366 libusb_close(handle); 368 libusb_close(handle);