From fe7c2a66d3ccd9b265f7a16439173f8c96e0be80 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Wed, 1 Apr 2009 06:34:55 +0000 Subject: [PATCH] - increase timeouts for Canon cameras (#476355), thanks to Andrzej Nowak and Russell Harrison --- gphoto2-canontimeout.patch | 24 ++++++++++++++++++++++++ libgphoto2.spec | 8 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gphoto2-canontimeout.patch diff --git a/gphoto2-canontimeout.patch b/gphoto2-canontimeout.patch new file mode 100644 index 0000000..01d4e0a --- /dev/null +++ b/gphoto2-canontimeout.patch @@ -0,0 +1,24 @@ +diff -upr libgphoto2-2.4.3/camlibs/canon/usb.c libgphoto2-2.4.3.rlh/camlibs/canon/usb.c +--- libgphoto2-2.4.3/camlibs/canon/usb.c 2008-08-08 16:12:57.000000000 -0400 ++++ libgphoto2-2.4.3.rlh/camlibs/canon/usb.c 2009-03-31 12:44:05.000000000 -0400 +@@ -72,7 +72,7 @@ + + /* CANON_FAST_TIMEOUT: how long (in milliseconds) we should wait for + * an URB to come back on an interrupt endpoint */ +-#define CANON_FAST_TIMEOUT 175 ++#define CANON_FAST_TIMEOUT 500 + + /* WARNING: This destroys reentrancy of the code. Better to put this + * in the camera descriptor somewhere. */ +diff -upr libgphoto2-2.4.3/camlibs/ptp2/library.c libgphoto2-2.4.3.rlh/camlibs/ptp2/library.c +--- libgphoto2-2.4.3/camlibs/ptp2/library.c 2008-10-19 12:41:36.000000000 -0400 ++++ libgphoto2-2.4.3.rlh/camlibs/ptp2/library.c 2009-03-31 12:44:49.000000000 -0400 +@@ -59,7 +59,7 @@ + #define GP_MODULE "PTP2" + + #define USB_START_TIMEOUT 8000 +-#define USB_CANON_START_TIMEOUT 500 /* 0.5 seconds */ ++#define USB_CANON_START_TIMEOUT 1500 /* 1.5 seconds */ + #define USB_NORMAL_TIMEOUT 20000 + #define USB_TIMEOUT_CAPTURE 20000 + diff --git a/libgphoto2.spec b/libgphoto2.spec index 7d85785..98ae877 100644 --- a/libgphoto2.spec +++ b/libgphoto2.spec @@ -1,7 +1,7 @@ Summary: Library for accessing digital cameras Name: libgphoto2 Version: 2.4.4 -Release: 3%{?dist} +Release: 4%{?dist} # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2 License: GPLv2+ and GPLv2 Group: Development/Libraries @@ -11,6 +11,7 @@ Patch1: gphoto2-pkgcfg.patch Patch2: gphoto2-storage.patch Patch3: gphoto2-ixany.patch Patch4: gphoto2-maxentries.patch +Patch5: gphoto2-canontimeout.patch Url: http://www.gphoto.org/ Requires: lockdev BuildRequires: libusb-devel >= 0.1.5 @@ -54,6 +55,7 @@ use libgphoto2. %patch2 -p1 -b .storage %patch3 -p1 -b .ixany %patch4 -p1 -b .maxentries +%patch5 -p1 -b .canontimeout for i in AUTHORS COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do mv ${i} ${i}.old @@ -151,6 +153,10 @@ rm -rf "${RPM_BUILD_ROOT}" %{_mandir}/man3/* %changelog +* Wed Apr 01 2009 Jindrich Novy 2.4.4-4 +- increase timeouts for Canon cameras (#476355), thanks to + Andrzej Nowak and Russell Harrison + * Thu Mar 05 2009 Caolán McNamara - 2.4.4-3 - tweak BR to get to build