# Error in "mustek.c"

Joerg Anders (J.Anders@Informatik.TU-Chemnitz.DE)
Tue, 9 Mar 1999 11:18:54 +0100 (MET)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: David F. Skoll: "Change of address"
- Previous message: Marc Rassbach: "Sheet feeder scanners?"

There is a bug in "sane-xxx/backend/mustek.c". (If think
even in the version 1.00) at the begining of the
function "sane_start":

/* First make sure we have a current parameter set. Some of the
parameters will be overwritten below, but that's OK. */
status = sane_get_parameters (s, 0);
if (status != SANE_STATUS_GOOD)
return status;

I inserted:

/* First make sure we have a current parameter set. Some of the
parameters will be overwritten below, but that's OK. */
status = sane_get_parameters (s, 0);

/* Changed on 2/24/1998 by J. Anders: */

if (!strcmp(s->val[OPT_SOURCE].s, "Automatic Document Feeder") &&
!(s->hw->flags & MUSTEK_FLAG_ADF_READY)) {
return SANE_STATUS_NO_DOCS;
}
if (status != SANE_STATUS_GOOD)
return status;

Otherwise SANE_STATUS_GOOD is returend and if you have an
automatic document feeder it isn't detectable that no
paper is in the document feeder.

I tested it with version 0.73. But I think version 1.00 will
have the same false behaviour.

    --
    J.Anders, Chemnitz, GERMANY (ja@informatik.tu-chemnitz.de)

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

     Next message: David F. Skoll: "Change of address"
     Previous message: Marc Rassbach: "Sheet feeder scanners?"