Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > b6206da31263c65b92ab7c4b4d976032 > files > 4

libmtp-1.0.6-3.fc14.src.rpm

diff --git a/src/libusb-glue.c b/src/libusb-glue.c
index 5d7889b..3c0a124 100644
--- a/src/libusb-glue.c
+++ b/src/libusb-glue.c
@@ -284,6 +284,13 @@ static int probe_device_descriptor(struct usb_device *dev, FILE *dumpfile)
 	    &dev->config[i].interface[j].altsetting[k];
 
 	  /*
+	   * MTP interfaces have three endpoints, two bulk and one
+	   * interrupt. Don't probe anything else.
+	   */
+	  if (intf->bNumEndpoints != 3)
+	    continue;
+
+	  /*
 	   * We only want to probe for the OS descriptor if the
 	   * device is USB_CLASS_VENDOR_SPEC or one of the interfaces
 	   * in it is, so flag if we find an interface like this.