sane-project-website/old-archive/1999-08/0273.html

92 wiersze
3.8 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Sun Aug 22 15:12:38 1999 PDT" -->
<!-- sent="Sun, 22 Aug 1999 21:01:30 +0200" -->
<!-- name="Andreas Beck" -->
<!-- email="becka@rz.uni-duesseldorf.de" -->
<!-- subject="Re: net problem" -->
<!-- id="" -->
<!-- inreplyto="37C02CA4.9FE6686B@tvd.be" -->
<title>sane-devel: Re: net problem</title>
<h1>Re: net problem</h1>
<b>Andreas Beck</b> (<a href="mailto:becka@rz.uni-duesseldorf.de"><i>becka@rz.uni-duesseldorf.de</i></a>)<br>
<i>Sun, 22 Aug 1999 21:01:30 +0200</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#273">[ date ]</a><a href="index.html#273">[ thread ]</a><a href="subject.html#273">[ subject ]</a><a href="author.html#273">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0274.html">Bernd Schroeder: "Re: microtek X6 advance and TMA"</a>
<li> <b>Previous message:</b> <a href="0272.html">abel deuring: "Re: SG_BIG_BUFF, glibc 2.1 weirdness ..."</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt; 15526 write(2, " Stripes: N"..., 34) = 34</i><br>
<i>&gt; 15526 write(2, " Slides: No"..., 33) = 33</i><br>
<i>&gt; 15526 write(2, " Scan button: Yes\n", 26) = 26</i><br>
<i>&gt; 15526 write(2, "\nImaging Capabilities...\n", 25) = -1 EPIPE (Broken pipe)</i><br>
<i>&gt; 15526 --- SIGPIPE (Broken pipe) ---</i><br>
<p>
That comes from the remote frontend closing the connection.<br>
<p>
<i>&gt; The SIGPIPE is weird.</i><br>
<i>&gt; The other end of the network (scanimage -L, with just the net driver active):</i><br>
<p>
Here is the network transfer:<br>
<p>
<i>&gt; write(24, "\0\0\0\0\1\0\0\3\0\0\0\4wim\0", 16) = 16</i><br>
A SANE_NET_INIT request.<br>
<p>
<i>&gt; read(24, "\0\0\0\0\1\0\0\3", 8192) = 8</i><br>
<p>
Answer looks good.<br>
<p>
<i>&gt; write(24, "\0\0\0\1", 4) = 4</i><br>
<i>&gt; read(24, "\n\nScanner attributes from device"..., 8192) = 43</i><br>
<p>
There we go. For some weird reason the saned sends textual data via the<br>
net stream. That looks like a bug in the backend or the saned.<br>
Seemingly the driver gives additional info to stderr, which gets redirected<br>
over the Network, and causes havoc in the binary protocol.<br>
<p>
<i>&gt; More strangeness: If I do saned -d, it works (just once though)...</i><br>
<p>
<i>&gt; I was just thinking, is this due to the text appearing at startup. </i><br>
<p>
Yes. Definitely. <br>
<p>
<i>&gt; somehow saned started from inetd seems to also send this to the client, </i><br>
<i>&gt; where with saned -d you only get to see the result of the probe, while </i><br>
<i>&gt; the text is on the console where I started saned -d.</i><br>
<p>
O.K. that indicates, that the backend for some reason sends that diagnostic<br>
stuff to stderr which seems to be mapped to the network connection by inetd<br>
what causes the problem. As a workaround I suggest to use a script saned.in:<br>
<p>
#!/bin/bash<br>
exec saned 2&gt;/dev/null<br>
<p>
which will avoid the stderr stuff to mix up with the net stuff.<br>
<p>
IMHO the backend should be fixed not to spit out such diagnostic stuff<br>
unless told to specifically using a SANE_DEBUG variable or similar.<br>
<p>
CU, ANdy<br>
<p>
<pre>
--
= Andreas Beck | Email : &lt;<a href="mailto:andreas.beck@ggi-project.org">andreas.beck@ggi-project.org</a>&gt; =
<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">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0274.html">Bernd Schroeder: "Re: microtek X6 advance and TMA"</a>
<li> <b>Previous message:</b> <a href="0272.html">abel deuring: "Re: SG_BIG_BUFF, glibc 2.1 weirdness ..."</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>