From: <mar...@us...> - 2012-08-01 21:48:13
|
Revision: 14086 http://gphoto.svn.sourceforge.net/gphoto/?rev=14086&view=rev Author: marcusmeissner Date: 2012-08-01 21:48:07 +0000 (Wed, 01 Aug 2012) Log Message: ----------- retrieve desc before using it Modified Paths: -------------- branches/libgphoto2-2_4/libgphoto2/libgphoto2_port/libusb1/libusb1.c Modified: branches/libgphoto2-2_4/libgphoto2/libgphoto2_port/libusb1/libusb1.c =================================================================== --- branches/libgphoto2-2_4/libgphoto2/libgphoto2_port/libusb1/libusb1.c 2012-08-01 21:36:04 UTC (rev 14085) +++ branches/libgphoto2-2_4/libgphoto2/libgphoto2_port/libusb1/libusb1.c 2012-08-01 21:48:07 UTC (rev 14086) @@ -1009,6 +1009,8 @@ if (class == 666) /* Special hack for MTP devices with MS OS descriptors. */ return gp_port_usb_match_mtp_device (dev, configno, interfaceno, altsettingno); + ret = libusb_get_device_descriptor(dev, &desc); + if (desc.bDeviceClass == class && (subclass == -1 || desc.bDeviceSubClass == subclass) && @@ -1016,7 +1018,6 @@ desc.bDeviceProtocol == protocol)) return 1; - ret = libusb_get_device_descriptor(dev, &desc); for (i = 0; i < desc.bNumConfigurations; i++) { struct libusb_config_descriptor *config; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |