sane-project-website/old-archive/2001-05/0114.html

175 wiersze
6.4 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: XSane parameters or buffer bug</TITLE>
<META NAME="Author" CONTENT="Oliver Rauch (oliver.rauch@rauch-domain.de)">
<META NAME="Subject" CONTENT="XSane parameters or buffer bug">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>XSane parameters or buffer bug</H1>
<!-- received="Thu May 10 09:23:54 2001" -->
<!-- isoreceived="20010510162354" -->
<!-- sent="Thu, 10 May 2001 18:18:44 +0200" -->
<!-- isosent="20010510161844" -->
<!-- name="Oliver Rauch" -->
<!-- email="oliver.rauch@rauch-domain.de" -->
<!-- subject="XSane parameters or buffer bug" -->
<!-- id="3AFABF64.6939D68@rauch-domain.de" -->
<!-- inreplyto="01051012341301.00606@slowcrap" -->
<STRONG>From:</STRONG> Oliver Rauch (<A HREF="mailto:oliver.rauch@rauch-domain.de?Subject=Re:%20XSane%20parameters%20or%20buffer%20bug&In-Reply-To=&lt;3AFABF64.6939D68@rauch-domain.de&gt;"><EM>oliver.rauch@rauch-domain.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu May 10 2001 - 09:18:44 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0115.html">mh: "Re:( XSane parameters or buffer bug"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0113.html">Major A: "Re: SANE 1.0.4 on Tru64 Unix: build failure"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0109.html">mh: "Re: EOF detection"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0115.html">mh: "Re:( XSane parameters or buffer bug"</A>
<LI><STRONG>Next in thread:</STRONG> <A HREF="0096.html">Henning Meier-Geinitz: "Re: EOF detection"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0115.html">mh: "Re:( XSane parameters or buffer bug"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#114">[ date ]</A>
<A HREF="index.html#114">[ thread ]</A>
<A HREF="subject.html#114">[ subject ]</A>
<A HREF="author.html#114">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
mh wrote:
<BR>
<P><EM>&gt; I don't know whether one should call it a bug in XSane; at least it could be
</EM><BR>
<EM>&gt; easily solved by calling sane_get_parameters() after sane_start() has been
</EM><BR>
<EM>&gt; called. (Oliver?)
</EM><BR>
<P>XSane does call sane_get parameters after sane_start:
<BR>
<P>xsane-preview.c (around line 1921):
<BR>
-----------------------------------------
<BR>
&nbsp;&nbsp;status = sane_start(dev);
<BR>
&nbsp;&nbsp;if (status != SANE_STATUS_GOOD)
<BR>
&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;snprintf(buf, sizeof(buf), &quot;%s %s.&quot;, ERR_FAILED_START_SCANNER, XSANE_STRSTATUS(status));
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;xsane_back_gtk_error(buf, TRUE);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;preview_scan_done(p);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;return;
<BR>
&nbsp;&nbsp;}
<BR>
&nbsp;
<BR>
&nbsp;&nbsp;status = sane_get_parameters(dev, &amp;p-&gt;params);
<BR>
-----------------------------------------
<BR>
<P>xsane-scan.c (around line 1571):
<BR>
-----------------------------------------
<BR>
&nbsp;&nbsp;status = sane_start(dev);
<BR>
&nbsp;&nbsp;DBG(DBG_info, &quot;sane_start returned with status %s\n&quot;, XSANE_STRSTATUS(status));
<BR>
&nbsp;
<BR>
&nbsp;&nbsp;if ((status == SANE_STATUS_NO_DOCS) &amp;&amp; (xsane.adf_page_counter&gt;0)) /* ADF out of docs but not first page */
<BR>
&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;xsane_scan_done(status); /* ok, stop multi image scan */
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;snprintf(buf, sizeof(buf), &quot;%s %d&quot;, TEXT_ADF_PAGES_SCANNED, xsane.adf_page_counter);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;xsane_back_gtk_info(buf, FALSE);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;xsane.adf_page_counter = 0;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;return;
<BR>
&nbsp;&nbsp;}
<BR>
&nbsp;&nbsp;else if (status != SANE_STATUS_GOOD) /* error */
<BR>
&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;xsane_scan_done(status);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;snprintf(buf, sizeof(buf), &quot;%s %s&quot;, ERR_FAILED_START_SCANNER, XSANE_STRSTATUS(status));
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;xsane_back_gtk_error(buf, TRUE);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;xsane.adf_page_counter = 0;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;return;
<BR>
&nbsp;&nbsp;}
<BR>
<P>&nbsp;&nbsp;status = sane_get_parameters(dev, &amp;xsane.param);
<BR>
-----------------------------------------
<BR>
<P>So if xsane gets wrong parameters it is the fault of the backend.
<BR>
<P>I also do not see an error in the scanning routine.
<BR>
May be there could happen something in the transformation routines
<BR>
(jpeg/tiff/png/...).
<BR>
<P>Bye
<BR>
Oliver
<BR>
<P><P><PRE>
--
Homepage: <A HREF="http://www.rauch-domain.de">http://www.rauch-domain.de</A>
sane-umax: <A HREF="http://www.rauch-domain.de/sane-umax">http://www.rauch-domain.de/sane-umax</A>
xsane: <A HREF="http://www.xsane.org">http://www.xsane.org</A>
E-Mail: mailto:<A HREF="mailto:Oliver.Rauch@rauch-domain.de?Subject=Re:%20XSane%20parameters%20or%20buffer%20bug&In-Reply-To=&lt;3AFABF64.6939D68@rauch-domain.de&gt;">Oliver.Rauch@rauch-domain.de</A>
<P>--
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:%20XSane%20parameters%20or%20buffer%20bug&In-Reply-To=&lt;3AFABF64.6939D68@rauch-domain.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0115.html">mh: "Re:( XSane parameters or buffer bug"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0113.html">Major A: "Re: SANE 1.0.4 on Tru64 Unix: build failure"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0109.html">mh: "Re: EOF detection"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0115.html">mh: "Re:( XSane parameters or buffer bug"</A>
<LI><STRONG>Next in thread:</STRONG> <A HREF="0096.html">Henning Meier-Geinitz: "Re: EOF detection"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0115.html">mh: "Re:( XSane parameters or buffer bug"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#114">[ date ]</A>
<A HREF="index.html#114">[ thread ]</A>
<A HREF="subject.html#114">[ subject ]</A>
<A HREF="author.html#114">[ 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>Thu May 10 2001 - 09:24:28 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>