diff options
author | Yavor Goulishev <yavor@google.com> | 2012-09-29 10:31:37 -0700 |
---|---|---|
committer | Yavor Goulishev <yavor@google.com> | 2012-09-29 10:31:37 -0700 |
commit | c1de2578a686fc1a0c2795f6a45159a4e20a4824 (patch) | |
tree | 176741fdbd03f16757680b188c87e1e20613ac5b | |
parent | afc55a0d0657e4e12b17ea4bac5472c0f17d338a (diff) | |
download | libmtp-c1de2578a686fc1a0c2795f6a45159a4e20a4824.tar.gz |
Filter out more devices.
Fixes issue: 6936891 Android File Transfer agent
breaks USB ethernet dongle on Macbook Air
Change-Id: Iacd5e4d283b56b5644e66ab660da79ce7b5bd24e
-rw-r--r-- | src/libusb-glue.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libusb-glue.c b/src/libusb-glue.c index a6f1a78..cdddfca 100644 --- a/src/libusb-glue.c +++ b/src/libusb-glue.c @@ -54,6 +54,8 @@ #define USB_CLASS_MISC 0xEF #endif +#define APPLE_VID 0x05ac + /* To enable debug prints for USB stuff, switch on this */ //#define ENABLE_USB_BULK_DEBUG @@ -229,10 +231,10 @@ static int probe_device_descriptor(struct usb_device *dev, FILE *dumpfile) * you find some weird combination... */ if (!(dev->descriptor.bDeviceClass == USB_CLASS_PER_INTERFACE || - dev->descriptor.bDeviceClass == USB_CLASS_COMM || - dev->descriptor.bDeviceClass == USB_CLASS_PTP || - dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC || - dev->descriptor.bDeviceClass == USB_CLASS_MISC)) { + dev->descriptor.bDeviceClass == USB_CLASS_PTP || + dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC) || + /* Apple devices sometimes freeze when probed by libusb */ + dev->descriptor.idVendor == APPLE_VID) { return 0; } |