kopia lustrzana https://gitlab.com/sane-project/website
130 wiersze
5.7 KiB
HTML
130 wiersze
5.7 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE>sane-devel: Re: Problems with XSane and Mustek backend</TITLE>
|
||
|
<META NAME="Author" CONTENT="Henning Meier-Geinitz (hmg-ml@gmx.de)">
|
||
|
<META NAME="Subject" CONTENT="Re: Problems with XSane and Mustek backend">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
||
|
<H1>Re: Problems with XSane and Mustek backend</H1>
|
||
|
<!-- received="Wed Jan 19 15:27:10 2000" -->
|
||
|
<!-- isoreceived="20000119232710" -->
|
||
|
<!-- sent="Thu, 20 Jan 2000 00:31:34 +0100" -->
|
||
|
<!-- isosent="20000119233134" -->
|
||
|
<!-- name="Henning Meier-Geinitz" -->
|
||
|
<!-- email="hmg-ml@gmx.de" -->
|
||
|
<!-- subject="Re: Problems with XSane and Mustek backend" -->
|
||
|
<!-- id="20000120003134.A4067@hmg1.vortex.robin.de" -->
|
||
|
<!-- inreplyto="20000118004042.A305@hmg1.vortex.robin.de" -->
|
||
|
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:hmg-ml@gmx.de?Subject=Re:%20Problems%20with%20XSane%20and%20Mustek%20backend&In-Reply-To=<20000120003134.A4067@hmg1.vortex.robin.de>"><EM>hmg-ml@gmx.de</EM></A>)<BR>
|
||
|
<STRONG>Date:</STRONG> Wed Jan 19 2000 - 15:31:34 PST
|
||
|
<P>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0160.html">Petter Reinholdtsen: "Re: FW: RICOH FS2 SCANNER"</A>
|
||
|
<UL>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0158.html">Harald Bauer: "LHII-backend for SANE"</A>
|
||
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0127.html">Henning Meier-Geinitz: "Problems with XSane and Mustek backend"</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0162.html">Oliver Rauch: "Re: Problems with XSane and Mustek backend"</A>
|
||
|
<LI><STRONG>Reply:</STRONG> <A HREF="0162.html">Oliver Rauch: "Re: Problems with XSane and Mustek backend"</A>
|
||
|
<LI><STRONG>Reply:</STRONG> <A HREF="0163.html">Oliver Rauch: "Re: Problems with XSane and Mustek backend"</A>
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#159">[ date ]</A>
|
||
|
<A HREF="index.html#159">[ thread ]</A>
|
||
|
<A HREF="subject.html#159">[ subject ]</A>
|
||
|
<A HREF="author.html#159">[ author ]</A>
|
||
|
</UL>
|
||
|
<HR NOSHADE><P>
|
||
|
<!-- body="start" -->
|
||
|
<P>
|
||
|
Replying to myself:
|
||
|
<BR>
|
||
|
<P>[About mustek backend and xsane/xscanimage hang]
|
||
|
<BR>
|
||
|
<P><EM>> I'm not very good at reading C source, so the following could be quite
|
||
|
</EM><BR>
|
||
|
<EM>> wrong: I looked into the source (mustek.c) and I think the problem is related
|
||
|
</EM><BR>
|
||
|
<EM>> to sane_read and especially sane_read returning SANE_STATUS_GOOD with a len
|
||
|
</EM><BR>
|
||
|
<EM>> of 0. That shouldn't happen in the blocking case (if I understand the SANE
|
||
|
</EM><BR>
|
||
|
<EM>> standard correctly) but it does.
|
||
|
</EM><BR>
|
||
|
<P>It doesn't. If I disable sane_set_io_mode (only blocking possible) I can
|
||
|
<BR>
|
||
|
scan without any problems. Only non blocking mode hangs.
|
||
|
<BR>
|
||
|
<P>I'm not sure if it's the fault of mustek.c or xsane (or mine). The sane
|
||
|
<BR>
|
||
|
standard says that the filedescriptor that is returned by sane_get_select_fd
|
||
|
<BR>
|
||
|
should be closed when the next sane_read would get eof. I think mustek.c
|
||
|
<BR>
|
||
|
does this correctly (the reader_process is closed). For non blocking mode
|
||
|
<BR>
|
||
|
xsane uses a gdk_input_add watching the file descriptor it got from
|
||
|
<BR>
|
||
|
sane_get_select_fd for readable data. If there is data it will start
|
||
|
<BR>
|
||
|
xsane_read_image_data (which does sane_read) until there is no more data.
|
||
|
<BR>
|
||
|
The next call to sane_read would result in eof so the filedescriptor is
|
||
|
<BR>
|
||
|
closed. But I couldn't find any code in xsane checking for the closed fd.
|
||
|
<BR>
|
||
|
--> deadlock. A simple change in xsane did it for me, I just added the
|
||
|
<BR>
|
||
|
GDK_INPUT_EXCEPTION to gdk_input_add so xsane_read_image_data is called on
|
||
|
<BR>
|
||
|
error conditions, too (xsane-preview.c and xsane-scan.c):
|
||
|
<BR>
|
||
|
<P>xsane.input_tag = gdk_input_add(fd, GDK_INPUT_READ|GDK_INPUT_EXCEPTION,
|
||
|
<BR>
|
||
|
xsane_read_image_data, 0);
|
||
|
<BR>
|
||
|
<P>Would this be a fix or a new bug? I haven't looked into xscanimage.
|
||
|
<BR>
|
||
|
<P>I really don't know why it works with kernel 2.0.
|
||
|
<BR>
|
||
|
<P>Ciao,
|
||
|
<BR>
|
||
|
Henning
|
||
|
<BR>
|
||
|
<P><PRE>
|
||
|
--
|
||
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
||
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Problems%20with%20XSane%20and%20Mustek%20backend&In-Reply-To=<20000120003134.A4067@hmg1.vortex.robin.de>">majordomo@mostang.com</A>
|
||
|
</PRE>
|
||
|
<P><!-- body="end" -->
|
||
|
<HR NOSHADE>
|
||
|
<UL>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0160.html">Petter Reinholdtsen: "Re: FW: RICOH FS2 SCANNER"</A>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0158.html">Harald Bauer: "LHII-backend for SANE"</A>
|
||
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0127.html">Henning Meier-Geinitz: "Problems with XSane and Mustek backend"</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0162.html">Oliver Rauch: "Re: Problems with XSane and Mustek backend"</A>
|
||
|
<LI><STRONG>Reply:</STRONG> <A HREF="0162.html">Oliver Rauch: "Re: Problems with XSane and Mustek backend"</A>
|
||
|
<LI><STRONG>Reply:</STRONG> <A HREF="0163.html">Oliver Rauch: "Re: Problems with XSane and Mustek backend"</A>
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#159">[ date ]</A>
|
||
|
<A HREF="index.html#159">[ thread ]</A>
|
||
|
<A HREF="subject.html#159">[ subject ]</A>
|
||
|
<A HREF="author.html#159">[ author ]</A>
|
||
|
</UL>
|
||
|
<!-- trailer="footer" -->
|
||
|
<HR NOSHADE>
|
||
|
<P>
|
||
|
<SMALL>
|
||
|
<EM>
|
||
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
||
|
: <EM>Wed Jan 19 2000 - 15:27:57 PST</EM>
|
||
|
</EM>
|
||
|
</SMALL>
|
||
|
</BODY>
|
||
|
</HTML>
|