From: <mar...@us...> - 2012-03-26 19:29:18
|
Revision: 13949 http://gphoto.svn.sourceforge.net/gphoto/?rev=13949&view=rev Author: marcusmeissner Date: 2012-03-26 19:29:11 +0000 (Mon, 26 Mar 2012) Log Message: ----------- do not save the settings, we need to update them Modified Paths: -------------- trunk/libgphoto2/libgphoto2_port/libusb1/libusb1.c trunk/libgphoto2/libgphoto2_port/usb/libusb.c Modified: trunk/libgphoto2/libgphoto2_port/libusb1/libusb1.c =================================================================== --- trunk/libgphoto2/libgphoto2_port/libusb1/libusb1.c 2012-03-24 18:03:03 UTC (rev 13948) +++ trunk/libgphoto2/libgphoto2_port/libusb1/libusb1.c 2012-03-26 19:29:11 UTC (rev 13949) @@ -429,11 +429,15 @@ { int ret, curread; - if (!port || !port->pl->dh) + if (!port || !port->pl->dh) { + gp_log (GP_LOG_ERROR, "libusb1", "gp_port_usb_read: bad parameters"); return GP_ERROR_BAD_PARAMETERS; + } + gp_log (GP_LOG_DEBUG, "libusb1", "reading with timeout %d", port->timeout); ret = libusb_bulk_transfer (port->pl->dh, port->settings.usb.inep, (unsigned char*)bytes, size, &curread, port->timeout); + gp_log (GP_LOG_DEBUG, "libusb1", "ret = %d", ret); if (ret < 0) return GP_ERROR_IO_READ; @@ -568,9 +572,11 @@ port->settings_pending.usb.altsetting ); +/* do not overwrite it ... we need to set it. if (port->pl->interface == -1) port->pl->interface = port->settings.usb.interface; if (port->pl->config == -1) port->pl->config = port->settings.usb.config; if (port->pl->altsetting == -1) port->pl->altsetting = port->settings.usb.altsetting; +*/ /* The portname can also be changed with the device still fully closed. */ memcpy(&port->settings.usb.port, &port->settings_pending.usb.port, Modified: trunk/libgphoto2/libgphoto2_port/usb/libusb.c =================================================================== --- trunk/libgphoto2/libgphoto2_port/usb/libusb.c 2012-03-24 18:03:03 UTC (rev 13948) +++ trunk/libgphoto2/libgphoto2_port/usb/libusb.c 2012-03-26 19:29:11 UTC (rev 13949) @@ -553,9 +553,11 @@ port->settings_pending.usb.altsetting ); +#if 0 if (port->pl->interface == -1) port->pl->interface = port->settings.usb.interface; if (port->pl->config == -1) port->pl->config = port->settings.usb.config; if (port->pl->altsetting == -1) port->pl->altsetting = port->settings.usb.altsetting; +#endif /* The portname can also be changed with the device still fully closed. */ memcpy(&port->settings.usb.port, &port->settings_pending.usb.port, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |