Files
curios/vendor/harmony-connector/libmtp-close-timeout.patch
T

13 lines
446 B
Diff

--- a/src/libusb1-glue.c
+++ b/src/libusb1-glue.c
@@ -2358,6 +2358,9 @@
void close_device (PTP_USB *ptp_usb, PTPParams *params)
{
+ /* Closing is a small command, not a file transfer. A non-responsive
+ * CloseSession must not consume the device's long transfer timeout. */
+ set_usb_device_timeout(ptp_usb, 2000);
if (ptp_closesession(params)!=PTP_RC_OK)
LIBMTP_ERROR("ERROR: Could not close session!\n");
close_usb(ptp_usb);