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

130 wiersze
4.5 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: SANE protocol error ?</TITLE>
<META NAME="Author" CONTENT="Henning Meier-Geinitz (henning@meier-geinitz.de)">
<META NAME="Subject" CONTENT="Re: SANE protocol error ?">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: SANE protocol error ?</H1>
<!-- received="Sat May 19 09:46:20 2001" -->
<!-- isoreceived="20010519164620" -->
<!-- sent="Sat, 19 May 2001 18:40:11 +0200" -->
<!-- isosent="20010519164011" -->
<!-- name="Henning Meier-Geinitz" -->
<!-- email="henning@meier-geinitz.de" -->
<!-- subject="Re: SANE protocol error ?" -->
<!-- id="20010519184011.A13154@vortex.swb.de" -->
<!-- inreplyto="E14tzLx-0004MH-00@minerva" -->
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:henning@meier-geinitz.de?Subject=Re:%20SANE%20protocol%20error%20?&In-Reply-To=&lt;20010519184011.A13154@vortex.swb.de&gt;"><EM>henning@meier-geinitz.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Sat May 19 2001 - 09:40:11 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0251.html">Henning Meier-Geinitz: "Re: Return values of sane_init() (Was: EOF detection)"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0249.html">Karl Heinz Kremer: "Re: Recommend a USB scanner with Transparency Scanning"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#250">[ date ]</A>
<A HREF="index.html#250">[ thread ]</A>
<A HREF="subject.html#250">[ subject ]</A>
<A HREF="author.html#250">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>On Mon, Apr 30, 2001 at 12:07:41AM +0200, Petter Reinholdtsen wrote:
<BR>
<EM>&gt; If I understand correctly, the function sanei_w_control_option_req()
</EM><BR>
<EM>&gt; will try to send the value of the option even if the action is
</EM><BR>
<EM>&gt; SANE_ACTION_GET_VALUE, and thus mostly send uninitialized values to
</EM><BR>
<EM>&gt; the SANE server. I haven't examined this part, but I suspect the
</EM><BR>
<EM>&gt; server ignore the value, and send a reply with the value of the
</EM><BR>
<EM>&gt; option.
</EM><BR>
<P>Not exactly. It just send the data to sane_control_option, where it's
<BR>
overwritten if action is SANE_ACTION_GET_VALUE.
<BR>
<P><EM>&gt; Why isn't the test == SANE_ACTION_GET_VALUE?
</EM><BR>
<P>I don't know. Probably this was forgotten when the bug concerning
<BR>
SET_AUTO was found.
<BR>
<P><EM>&gt; What would be the effect of changing this test to only send the value
</EM><BR>
<EM>&gt; if it contains anything interesting?
</EM><BR>
<P>I think there wouldn't be a problem. But the net protocl version
<BR>
number must be increased and yet another test for this version number
<BR>
has to be inserted so the new version remains compatible to old saned/net.
<BR>
I'm not sure if it's worth it.
<BR>
<P><EM>&gt; The problem is triggered by
</EM><BR>
<EM>&gt; calls like:
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; SANE_Int num_dev_options;
</EM><BR>
<EM>&gt; status = sane_control_option (device, 0, SANE_ACTION_GET_VALUE,
</EM><BR>
<EM>&gt; &amp;num_dev_options, 0);
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; In this case, the 'value' of num_dev_options is pushed on the wire.
</EM><BR>
<P>Yes, but isn't the only problem with this that some garbage is
<BR>
transported through the wire?
<BR>
<P>Bye,
<BR>
&nbsp;&nbsp;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:%20SANE%20protocol%20error%20?&In-Reply-To=&lt;20010519184011.A13154@vortex.swb.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0251.html">Henning Meier-Geinitz: "Re: Return values of sane_init() (Was: EOF detection)"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0249.html">Karl Heinz Kremer: "Re: Recommend a USB scanner with Transparency Scanning"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#250">[ date ]</A>
<A HREF="index.html#250">[ thread ]</A>
<A HREF="subject.html#250">[ subject ]</A>
<A HREF="author.html#250">[ 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>Sat May 19 2001 - 09:47:16 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>