summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog9
-rw-r--r--debian/patches/0130-usb-timeout.patch30
-rw-r--r--debian/patches/series1
3 files changed, 40 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index bb6d08e..94ba5ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+sane-backends (1.0.25-3) UNRELEASED; urgency=low
+
+ * New debian/patches/0130-usb-timeout.patch:
+ - Add a timeout to prevent "Resource temporarily unavailable" error
+ (Closes: #810919).
+ Thanks to Steve Graham <bugs@annaghvarn.plus.com>.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Sat, 16 Jan 2016 21:30:19 +0100
+
sane-backends (1.0.25-2) unstable; urgency=medium
* Undelete, refresh and rename debian/patches/
diff --git a/debian/patches/0130-usb-timeout.patch b/debian/patches/0130-usb-timeout.patch
new file mode 100644
index 0000000..284d3cf
--- /dev/null
+++ b/debian/patches/0130-usb-timeout.patch
@@ -0,0 +1,30 @@
+Description: Add timeout before usb bulk write
+Author: Steve Graham <bugs@annaghvarn.plus.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810919
+Forwarded: https://alioth.debian.org/tracker/index.php?func=detail&aid=315288&group_id=30186&atid=410366
+Last-Update: 2016-01-25
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/sanei/sanei_usb.c
+===================================================================
+--- trunk.orig/sanei/sanei_usb.c
++++ trunk/sanei/sanei_usb.c
+@@ -2411,6 +2411,10 @@ SANE_Status
+ sanei_usb_write_bulk (SANE_Int dn, const SANE_Byte * buffer, size_t * size)
+ {
+ ssize_t write_size = 0;
++ struct timespec sleepytime, sleepyremain;
++
++ sleepytime.tv_nsec = 50000L; /* nanoseconds */
++ sleepytime.tv_sec = 0;
+
+ if (!size)
+ {
+@@ -2439,6 +2443,7 @@ sanei_usb_write_bulk (SANE_Int dn, const
+ else if (devices[dn].method == sanei_usb_method_libusb)
+ #ifdef HAVE_LIBUSB
+ {
++ nanosleep(&sleepytime, &sleepyremain); /* sg */
+ if (devices[dn].bulk_out_ep)
+ {
+ write_size = usb_bulk_write (devices[dn].libusb_handle,
diff --git a/debian/patches/series b/debian/patches/series
index a33196e..375c6e5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,3 +16,4 @@
0705-kfreebsd.patch
0710-sane-desc.c_debian_mods.patch
0125-multiarch_dll_search_path.patch
+0130-usb-timeout.patch