aboutsummaryrefslogtreecommitdiff
path: root/src/libusb1-glue.c
diff options
context:
space:
mode:
authorLinus Walleij <triad@df.lth.se>2012-01-28 10:42:36 +0100
committerLinus Walleij <triad@df.lth.se>2012-01-28 10:42:36 +0100
commitbda39ab9dec06c34236d1d7b01492fe13ca3d595 (patch)
treeadbc7172ac1c10e691270c74a38a308c03f69f2e /src/libusb1-glue.c
parent61785631eef6a46e5531e64c6e8794513e32136c (diff)
downloadlibmtp-bda39ab9dec06c34236d1d7b01492fe13ca3d595.tar.gz
Just docs
Signed-off-by: Linus Walleij <triad@df.lth.se>
Diffstat (limited to 'src/libusb1-glue.c')
-rw-r--r--src/libusb1-glue.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/libusb1-glue.c b/src/libusb1-glue.c
index 383cc82..f2c9a0d 100644
--- a/src/libusb1-glue.c
+++ b/src/libusb1-glue.c
@@ -4,7 +4,7 @@
*
* Copyright (C) 2005-2007 Richard A. Low <richard@wentnet.com>
* Copyright (C) 2005-2012 Linus Walleij <triad@df.lth.se>
- * Copyright (C) 2006-2011 Marcus Meissner
+ * Copyright (C) 2006-2012 Marcus Meissner
* Copyright (C) 2007 Ted Bullock
* Copyright (C) 2008 Chris Bagwell <chris@cnpbagwell.com>
*
@@ -237,7 +237,14 @@ static int probe_device_descriptor(libusb_device *dev, FILE *dumpfile)
return 0;
}
- /* Attempt to open Device on this port */
+ /*
+ * Attempt to open Device on this port
+ *
+ * TODO: is there a way to check the number of endpoints etc WITHOUT
+ * opening the device? Some color calibration devices are REALLY
+ * sensitive to this, and I found a Canon custom scanner that doesn't
+ * like it at all either :-(
+ */
ret = libusb_open(dev, &devh);
if (ret != LIBUSB_SUCCESS) {
/* Could not open this device */
@@ -245,12 +252,6 @@ static int probe_device_descriptor(libusb_device *dev, FILE *dumpfile)
}
/*
- * This sometimes crashes on the j for loop below
- * I think it is because config is NULL yet
- * dev->descriptor.bNumConfigurations > 0
- * this check should stop this
- */
- /*
* Loop over the device configurations and interfaces. Nokia MTP-capable
* handsets (possibly others) typically have the string "MTP" in their
* MTP interface descriptions, that's how they can be detected, before
@@ -301,9 +302,11 @@ static int probe_device_descriptor(libusb_device *dev, FILE *dumpfile)
fprintf(dumpfile, " Found PTP device, check vendor "
"extension...\n");
}
- // This is where we may insert code to open a PTP
- // session and query the vendor extension ID to see
- // if it is 0xffffffff, i.e. MTP according to the spec.
+ /*
+ * This is where we may insert code to open a PTP
+ * session and query the vendor extension ID to see
+ * if it is 0xffffffff, i.e. MTP according to the spec.
+ */
if (was_mtp_extension) {
libusb_close(devh);
return 1;