please include Patch for sane-backend - hp3500c - fixing lights issues and probably other uninitialisation problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sane-backends (Ubuntu) |
Fix Released
|
Undecided
|
Rolf Leggewie |
Bug Description
from a correspondence with troy rollo:
I asked:
> After finishing a scan of the first page the slay stays in its current
> > (ending) position. It does not return to its parking position (top)with
> > simple scan (reproducible) . Scanning further pages is hence not
> > possible until the scanner gets disconnected and reconnected again.
> > (Simple Scan crashes then, of course).
He answered
This looks like the problem fixed by commit
8ec394d6489dac4
1.0.21.
lists the following changes
diff --git a/backend/hp3500.c b/backend/hp3500.c
index 56b48b0..6844a5e 100644 (file)
--- a/backend/hp3500.c
+++ b/backend/hp3500.c
@@ -3392,27 +3392,28 @@ reader_process (void *pv)
sigset_t sigterm_set;
struct SIGACTION act;
struct hp3500_write_info winfo;
+ int status;
if (sanei_
{
close (scanner->pipe_r);
- }
- sigfillset (&ignore_set);
- sigdelset (&ignore_set, SIGTERM);
-#if defined (__APPLE__) && defined (__MACH__)
- sigdelset (&ignore_set, SIGUSR2);
+ sigfillset (&ignore_set);
+ sigdelset (&ignore_set, SIGTERM);
+#if defined (__APPLE__) && defined (__MACH__)
+ sigdelset (&ignore_set, SIGUSR2);
#endif
- sigprocmask (SIG_SETMASK, &ignore_set, 0);
+ sigprocmask (SIG_SETMASK, &ignore_set, 0);
- sigemptyset (&sigterm_set);
- sigaddset (&sigterm_set, SIGTERM);
+ sigemptyset (&sigterm_set);
+ sigaddset (&sigterm_set, SIGTERM);
- memset (&act, 0, sizeof (act));
-#ifdef _POSIX_SOURCE
- act.sa_handler = sigtermHandler;
+ memset (&act, 0, sizeof (act));
+#ifdef _POSIX_SOURCE
+ act.sa_handler = sigtermHandler;
#endif
- sigaction (SIGTERM, &act, 0);
+ sigaction (SIGTERM, &act, 0);
+ }
/* Warm up the lamp again if our last scan ended more than 5 minutes ago. */
@@ -3447,6 +3448,8 @@ reader_process (void *pv)
&winfo) >= 0)
- exit (SANE_STATUS_GOOD);
- exit (SANE_STATUS_
+ status = SANE_STATUS_GOOD;
+ status = SANE_STATUS_
+ close (scanner->pipe_w);
+ return status;
}
tags: | added: patch |
epek, sorry for the late response. Is this something that still affects precise or later?