kopia lustrzana https://gitlab.com/sane-project/website
111 wiersze
4.4 KiB
HTML
111 wiersze
4.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: SANE protocol error ?</TITLE>
|
||
|
<META NAME="Author" CONTENT="Petter Reinholdtsen (pere@hungry.com)">
|
||
|
<META NAME="Subject" CONTENT="SANE protocol error ?">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
||
|
<H1>SANE protocol error ?</H1>
|
||
|
<!-- received="Sun Apr 29 15:01:07 2001" -->
|
||
|
<!-- isoreceived="20010429220107" -->
|
||
|
<!-- sent="Mon, 30 Apr 2001 00:07:41 +0200" -->
|
||
|
<!-- isosent="20010429220741" -->
|
||
|
<!-- name="Petter Reinholdtsen" -->
|
||
|
<!-- email="pere@hungry.com" -->
|
||
|
<!-- subject="SANE protocol error ?" -->
|
||
|
<!-- id="E14tzLx-0004MH-00@minerva" -->
|
||
|
<STRONG>From:</STRONG> Petter Reinholdtsen (<A HREF="mailto:pere@hungry.com?Subject=Re:%20SANE%20protocol%20error%20?&In-Reply-To=<E14tzLx-0004MH-00@minerva>"><EM>pere@hungry.com</EM></A>)<BR>
|
||
|
<STRONG>Date:</STRONG> Sun Apr 29 2001 - 15:07:41 PDT
|
||
|
<P>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0311.html">mKlein: "same old "no device" problem"</A>
|
||
|
<UL>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0309.html">Petter Reinholdtsen: "Re: scanimage -T using Purify..."</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#310">[ date ]</A>
|
||
|
<A HREF="index.html#310">[ thread ]</A>
|
||
|
<A HREF="subject.html#310">[ subject ]</A>
|
||
|
<A HREF="author.html#310">[ author ]</A>
|
||
|
</UL>
|
||
|
<HR NOSHADE><P>
|
||
|
<!-- body="start" -->
|
||
|
<P>
|
||
|
If I understand correctly, the function sanei_w_control_option_req()
|
||
|
<BR>
|
||
|
will try to send the value of the option even if the action is
|
||
|
<BR>
|
||
|
SANE_ACTION_GET_VALUE, and thus mostly send uninitialized values to
|
||
|
<BR>
|
||
|
the SANE server. I haven't examined this part, but I suspect the
|
||
|
<BR>
|
||
|
server ignore the value, and send a reply with the value of the
|
||
|
<BR>
|
||
|
option. The code looks like this:
|
||
|
<BR>
|
||
|
<P> /* Up to and including version 2, we incorrectly attempted to encode
|
||
|
<BR>
|
||
|
the option value even the action was SANE_ACTION_SET_AUTO. */
|
||
|
<BR>
|
||
|
if (w->version < 3 || req->action != SANE_ACTION_SET_AUTO)
|
||
|
<BR>
|
||
|
{
|
||
|
<BR>
|
||
|
sanei_w_word (w, &req->value_type);
|
||
|
<BR>
|
||
|
sanei_w_word (w, &req->value_size);
|
||
|
<BR>
|
||
|
w_option_value (w, req->value_type, req->value_size, &req->value);
|
||
|
<BR>
|
||
|
}
|
||
|
<BR>
|
||
|
<P>Why isn't the test == SANE_ACTION_GET_VALUE? What would be the effect
|
||
|
<BR>
|
||
|
of changing this test to only send the value if it contains anything
|
||
|
<BR>
|
||
|
interesting? The problem is triggered by calls like:
|
||
|
<BR>
|
||
|
<P> SANE_Int num_dev_options;
|
||
|
<BR>
|
||
|
status = sane_control_option (device, 0, SANE_ACTION_GET_VALUE,
|
||
|
<BR>
|
||
|
&num_dev_options, 0);
|
||
|
<BR>
|
||
|
<P>In this case, the 'value' of num_dev_options is pushed on the wire.
|
||
|
<BR>
|
||
|
<PRE>
|
||
|
--
|
||
|
##> Petter Reinholdtsen <## | <A HREF="mailto:pere@td.org.uit.no?Subject=Re:%20SANE%20protocol%20error%20?&In-Reply-To=<E14tzLx-0004MH-00@minerva>">pere@td.org.uit.no</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:%20SANE%20protocol%20error%20?&In-Reply-To=<E14tzLx-0004MH-00@minerva>">majordomo@mostang.com</A>
|
||
|
</PRE>
|
||
|
<P><!-- body="end" -->
|
||
|
<HR NOSHADE>
|
||
|
<UL>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0311.html">mKlein: "same old "no device" problem"</A>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0309.html">Petter Reinholdtsen: "Re: scanimage -T using Purify..."</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#310">[ date ]</A>
|
||
|
<A HREF="index.html#310">[ thread ]</A>
|
||
|
<A HREF="subject.html#310">[ subject ]</A>
|
||
|
<A HREF="author.html#310">[ 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>Sun Apr 29 2001 - 15:01:39 PDT</EM>
|
||
|
</EM>
|
||
|
</SMALL>
|
||
|
</BODY>
|
||
|
</HTML>
|