kopia lustrzana https://gitlab.com/sane-project/website
198 wiersze
6.4 KiB
HTML
198 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: Re: bug in saned</TITLE>
|
|
<META NAME="Author" CONTENT="Jochen Eisinger (jochen.eisinger@gno.de)">
|
|
<META NAME="Subject" CONTENT="Re: bug in saned">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: bug in saned</H1>
|
|
<!-- received="Fri Jun 30 14:12:41 2000" -->
|
|
<!-- isoreceived="20000630211241" -->
|
|
<!-- sent="Fri, 30 Jun 2000 23:23:46 +0200" -->
|
|
<!-- isosent="20000630212346" -->
|
|
<!-- name="Jochen Eisinger" -->
|
|
<!-- email="jochen.eisinger@gno.de" -->
|
|
<!-- subject="Re: bug in saned" -->
|
|
<!-- id="395D0FE2.B9E62D52@gno.de" -->
|
|
<!-- inreplyto="200006300418.MAA19387@localhost.localdomain" -->
|
|
<STRONG>From:</STRONG> Jochen Eisinger (<A HREF="mailto:jochen.eisinger@gno.de?Subject=Re:%20bug%20in%20saned&In-Reply-To=<395D0FE2.B9E62D52@gno.de>"><EM>jochen.eisinger@gno.de</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Fri Jun 30 2000 - 14:23:46 PDT
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0238.html">Joachim Ansorg: "Re: Problems with mustek scanner"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0236.html">mh: "Sane API problem: multiple sane_init calls"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0224.html">Petter Reinholdtsen: "Re: bug in saned"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#237">[ date ]</A>
|
|
<A HREF="index.html#237">[ thread ]</A>
|
|
<A HREF="subject.html#237">[ subject ]</A>
|
|
<A HREF="author.html#237">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Hi,
|
|
<BR>
|
|
<P><EM>> Why where SIGPIPE not catched in the first place? Do you have a
|
|
</EM><BR>
|
|
<EM>> patch? Could this bug be related to the problem people reports when
|
|
</EM><BR>
|
|
<EM>> running a net scanner on localhost?
|
|
</EM><BR>
|
|
<P>Sorry, I don't really understand what you mean by "catched in the first
|
|
<BR>
|
|
place"... saned has a sighandler installed for sigpipe and this handler
|
|
<BR>
|
|
is callen (if you start saned with -d128 you can see the signo) and
|
|
<BR>
|
|
saned exits. the net backend afterwards crashes (because it thinks saned
|
|
<BR>
|
|
is still running...)
|
|
<BR>
|
|
<P>I've attached a patch against the saned.c from the 1.0.2 distribution...
|
|
<BR>
|
|
<P>-- jochen
|
|
<BR>
|
|
|
|
<BR><P>
|
|
--- frontend/saned.c Sun Mar 5 14:44:45 2000
|
|
<BR>
|
|
+++ saned.c Fri Jun 30 23:18:41 2000
|
|
<BR>
|
|
@@ -100,6 +100,7 @@
|
|
<BR>
|
|
{
|
|
<BR>
|
|
u_int inuse : 1; /* is this handle in use? */
|
|
<BR>
|
|
u_int scanning : 1; /* are we scanning? */
|
|
<BR>
|
|
+ u_int docancel : 1; /* cancel the current scan */
|
|
<BR>
|
|
SANE_Handle handle; /* backends handle */
|
|
<BR>
|
|
}
|
|
<BR>
|
|
Handle;
|
|
<BR>
|
|
@@ -524,7 +525,10 @@
|
|
<BR>
|
|
|
|
<BR>
|
|
reply->status = sane_start (be_handle);
|
|
<BR>
|
|
if (reply->status == SANE_STATUS_GOOD)
|
|
<BR>
|
|
- handle[h].scanning = 1;
|
|
<BR>
|
|
+ {
|
|
<BR>
|
|
+ handle[h].scanning = 1;
|
|
<BR>
|
|
+ handle[h].docancel = 0;
|
|
<BR>
|
|
+ }
|
|
<BR>
|
|
|
|
<BR>
|
|
return fd;
|
|
<BR>
|
|
}
|
|
<BR>
|
|
@@ -674,10 +678,13 @@
|
|
<BR>
|
|
{
|
|
<BR>
|
|
DBG(4, "do_scan: processing RPC request on fd %d\n", w->io.fd);
|
|
<BR>
|
|
process_request (w);
|
|
<BR>
|
|
+ if (handle[h].docancel)
|
|
<BR>
|
|
+ break;
|
|
<BR>
|
|
}
|
|
<BR>
|
|
}
|
|
<BR>
|
|
while (status == SANE_STATUS_GOOD || bytes_in_buf > 0 || status_dirty);
|
|
<BR>
|
|
DBG(2, "do_scan: done, status=%s\n", sane_strstatus (status));
|
|
<BR>
|
|
+ handle[h].docancel = 0;
|
|
<BR>
|
|
handle[h].scanning = 0;
|
|
<BR>
|
|
}
|
|
<BR>
|
|
|
|
<BR>
|
|
@@ -854,6 +861,7 @@
|
|
<BR>
|
|
{
|
|
<BR>
|
|
sane_cancel (handle[h].handle);
|
|
<BR>
|
|
handle[h].scanning = 0;
|
|
<BR>
|
|
+ handle[h].docancel = 0;
|
|
<BR>
|
|
syslog (LOG_ERR, "process_request: accept failed! (%s)\n",
|
|
<BR>
|
|
strerror (errno));
|
|
<BR>
|
|
return;
|
|
<BR>
|
|
@@ -872,6 +880,7 @@
|
|
<BR>
|
|
|
|
<BR>
|
|
h = decode_handle (w, "cancel");
|
|
<BR>
|
|
sane_cancel (handle[h].handle);
|
|
<BR>
|
|
+ handle[h].docancel=1;
|
|
<BR>
|
|
sanei_w_reply (w, (WireCodecFunc) sanei_w_word, &ack);
|
|
<BR>
|
|
}
|
|
<BR>
|
|
break;
|
|
<BR>
|
|
<P><P><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=<395D0FE2.B9E62D52@gno.de>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0238.html">Joachim Ansorg: "Re: Problems with mustek scanner"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0236.html">mh: "Sane API problem: multiple sane_init calls"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0224.html">Petter Reinholdtsen: "Re: bug in saned"</A>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#237">[ date ]</A>
|
|
<A HREF="index.html#237">[ thread ]</A>
|
|
<A HREF="subject.html#237">[ subject ]</A>
|
|
<A HREF="author.html#237">[ 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>Fri Jun 30 2000 - 14:14:12 PDT</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|