[sane-devel] Problem with CanoScan N656U & Mac OS X 10.3.3

Mattias Ellert mattias.ellert@tsl.uu.se
Tue, 06 Apr 2004 11:59:16 +0200


This is a multi-part message in MIME format.
--------------060709010008070407050805
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Onizuka wrote:
> 
> Hi!
> Thank you for the help!
> After patching and rebuilding plustek.c scanimage hangs no more... so I 
> guess one problem is solved :-)
> Now the problem is an I/O error:
> 
> XS206:~ onizuka$ scanimage > prova.pnm
> scanimage: sane_read: Error during device I/O
> XS206:~ onizuka$
> 
> I ran again scanimage with debug set to 255 and the output 
> (gzip/uuencoded) is below
> 
>     Gianfranco

Try this patch instead. It only closes the write end of the pipe, and 
not both as the previous one.

	Mattias


diff -ur sane-backends.orig/backend/plustek.c 
sane-backends/backend/plustek.c
--- sane-backends.orig/backend/plustek.c        2004-01-09 
15:24:30.000000000 +0100
+++ sane-backends/backend/plustek.c     2004-04-06 11:54:39.000000000 +0200
@@ -443,6 +443,9 @@
                 return SANE_STATUS_IO_ERROR;
         }

+       close( scanner->w_pipe );
+       scanner->w_pipe = -1;
+
         DBG( _DBG_PROC, "reader_process: finished reading data\n" );
         return SANE_STATUS_GOOD;
  }


-- 
________________________________________________________________________

mattias.ellert@tsl.uu.se                           tel: +46 18 471 32 58
http://www.tsl.uu.se/~ellert/                      fax: +46 18 471 35 13
________________________________________________________________________

--------------060709010008070407050805
Content-Type: text/plain;
 name="sane-plustek.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="sane-plustek.patch"

diff -ur sane-backends.orig/backend/plustek.c sane-backends/backend/plustek.c
--- sane-backends.orig/backend/plustek.c	2004-01-09 15:24:30.000000000 +0100
+++ sane-backends/backend/plustek.c	2004-04-06 11:54:39.000000000 +0200
@@ -443,6 +443,9 @@
 		return SANE_STATUS_IO_ERROR;
 	}
 
+	close( scanner->w_pipe );
+	scanner->w_pipe = -1;
+
 	DBG( _DBG_PROC, "reader_process: finished reading data\n" );
 	return SANE_STATUS_GOOD;
 }

--------------060709010008070407050805--