[sane-devel] sane_cancel()

Kåre Särs kare.sars at kolumbus.fi
Tue Jul 15 23:24:36 UTC 2008

Hi again,

On Wednesdayen den 16 July 2008 02:02:36 Kåre Särs wrote:
> Hi,
> I'm a bit confused with the use of sane_cancel(). I noticed today that the
> pixma backend requires a sane_cancel after each scan (libksane did not work
> correctly with the pixma backend). I have read here on the list:
> "5. be aware that a proper front-end in batch mode will call
> sane_start() at the beginning of each page, but only call sane_cancel
> after the last page returns SANE_STATUS_NO_DOCS."
> Why does the frontend have to call sane_cancel() at the end of a scan?
> Is this a bug in the pixma backend (libksane works OK with at least the
> test, epson, epkowa and v4l backends), or is the pixma backend just more
> strict than the backends I have tested with before? (The problem was that
> the backend did not accept writes to any parameters after a scan without a
> cancel at the end.)
> I remember reading something about clarifying the use of sane_cancel() in
> the standard for 1.1, but I can't remember what it was about :)

Reading the standard again I see in 4.4 "Note that sane_cancel() must be 
called even if the last read operation returned SANE_STATUS_EOF."

But I'm still wondering why :)

Kåre Särs

More information about the sane-devel mailing list