kopia lustrzana https://gitlab.com/sane-project/website
119 wiersze
3.9 KiB
HTML
119 wiersze
3.9 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: bug in saned...</TITLE>
|
|
<META NAME="Author" CONTENT="Jochen Eisinger (jochen.eisinger@gno.de)">
|
|
<META NAME="Subject" CONTENT="bug in saned...">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>bug in saned...</H1>
|
|
<!-- received="Wed Jun 28 13:38:10 2000" -->
|
|
<!-- isoreceived="20000628203810" -->
|
|
<!-- sent="Wed, 28 Jun 2000 22:39:34 +0200" -->
|
|
<!-- isosent="20000628203934" -->
|
|
<!-- name="Jochen Eisinger" -->
|
|
<!-- email="jochen.eisinger@gno.de" -->
|
|
<!-- subject="bug in saned..." -->
|
|
<!-- id="395A6286.D9909560@gno.de" -->
|
|
<STRONG>From:</STRONG> Jochen Eisinger (<A HREF="mailto:jochen.eisinger@gno.de?Subject=Re:%20bug%20in%20saned...&In-Reply-To=<395A6286.D9909560@gno.de>"><EM>jochen.eisinger@gno.de</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Wed Jun 28 2000 - 13:39:34 PDT
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0207.html">Oliver Rauch: "Re: scsi command queuing"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0205.html">Henning Meier-Geinitz: "Re: scsi command queuing"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#206">[ date ]</A>
|
|
<A HREF="index.html#206">[ thread ]</A>
|
|
<A HREF="subject.html#206">[ subject ]</A>
|
|
<A HREF="author.html#206">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Hi,
|
|
<BR>
|
|
<P>I've send this eMail to sane-devel some days ago, but somehow, it never
|
|
<BR>
|
|
appeared... so I'm trying again...
|
|
<BR>
|
|
<P>-- jochen
|
|
<BR>
|
|
<P><EM>> orig mail:
|
|
</EM><BR>
|
|
<P>Hi,
|
|
<BR>
|
|
<P>I've found a bug in SANED. When you're scanning and you want to cancel
|
|
<BR>
|
|
the scan the net backend invokes SANE_NET_CANCEL. saned then calls
|
|
<BR>
|
|
sane_cancel and returns SANE_STATUS_OK. Then net.c closes the data_fd
|
|
<BR>
|
|
and saned continues with do_scan. If there is still image data in the
|
|
<BR>
|
|
saned buffer, it tries to write to the data_fd and receives a SIGPIPE
|
|
<BR>
|
|
and exits... and net.c crashes.
|
|
<BR>
|
|
<P>I avoid this by
|
|
<BR>
|
|
a) adding a field "u_int docancel : 1;" to struct Handle.
|
|
<BR>
|
|
<P>b) In process_request I add to SANE_NET_CANCEL "handle[h].docancel = 1;"
|
|
<BR>
|
|
<P>c) and at the and of do_scan where process_request is called I add "if
|
|
<BR>
|
|
(handle[h].docancel) break;" and to the line handle[h].scanning=0; I add
|
|
<BR>
|
|
"handle[h].docancel=0;".
|
|
<BR>
|
|
<P>d) in start_scan I add at the end to the line handle[h].scanning = 1;
|
|
<BR>
|
|
the line
|
|
<BR>
|
|
"handle[h].docancel=0;"
|
|
<BR>
|
|
<P>e) again in process_request I add to SANE_NET_START after the line
|
|
<BR>
|
|
handle[h].scanning=0 the line "handle[h].docancel=0".
|
|
<BR>
|
|
<P><P>Now the saned doesn't try to write to the closed pipe and net.c doesn't
|
|
<BR>
|
|
crash anymore.
|
|
<BR>
|
|
<P>-- jochen
|
|
<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:%20bug%20in%20saned...&In-Reply-To=<395A6286.D9909560@gno.de>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0207.html">Oliver Rauch: "Re: scsi command queuing"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0205.html">Henning Meier-Geinitz: "Re: scsi command queuing"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#206">[ date ]</A>
|
|
<A HREF="index.html#206">[ thread ]</A>
|
|
<A HREF="subject.html#206">[ subject ]</A>
|
|
<A HREF="author.html#206">[ 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 Jun 28 2000 - 13:39:42 PDT</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|