[sane-devel] Fix for infinte for loop
Hans Petter Selasky
hselasky at c2i.net
Sat Jul 9 09:05:56 UTC 2011
On Saturday 09 July 2011 06:38:27 stef wrote:
> Le vendredi 8 juillet 2011 11:09:15 Hans Petter Selasky, vous avez écrit :
> > --- /sane-backends-1.0.21/backend/genesys_gl646.c.orig 2011-07-08
> > 11:07:05.000000000 +0200 +++
> > /sane-backends-1.0.21/backend/genesys_gl646.c 2011-07-08
> > 11:07:47.000000000 +0200 @@ -3068,9 +3068,10 @@
> >
> > /* loop until head parked */
> > if (wait_until_home)
> >
> > {
> >
> > - int loop = 0;
> > + int loop;
> >
> > - while (loop < 3) /* do not wait longer then 30 seconds */
> > + /* do not wait longer then 30 seconds */
> > + for (loop = 0; loop < 300; loop++)
> >
> > {
> >
> > status = sanei_genesys_get_status (dev, &val);
> > if (status != SANE_STATUS_GOOD)
> >
> > I'm not suscribed to this list. Please keep me CC'ed.
> >
> > --HPS
>
> Hello,
>
> may I have more details ? On which hardware do you see this ? Why are you
> patching SANE 1.0.21 and not 1.0.22 ?
Hi,
It is not an real issue, but you see the code is broken. I saw this issue on a
HP scanner which is now broken due to unknown reasons. I doesn't rewind the
scanning head any more.
I'm patching sane 1.0.21 because that is what is currently available in
FreeBSD. I assume that the code is the same in 1.0.22 unless someone fixed
this issue.
Thanks,
--HPS
More information about the sane-devel
mailing list