[sane-devel] bug in test backend
Wed, 18 Dec 2002 17:01:34 +0100
On Wednesday 18 December 2002 12:26, Henning Meier-Geinitz wrote:
> > It also does make sense to allow sane_control_option etc
> > after EOF although that is not explictly shown in the code flow examp=
> If I understand the code flow correctly, sane_cancel must be called if
> anything but sane_start, sane_read, or sane_get_parameters should be
Although I do not like this I get the impression that you describe the id=
how it should be handled.
> Have I said before that I don't like the double meaning of
> sane_cancel ("stop current action" + "this was the last scan in a
> series")? :-)
> The frame is over after EOF. So why do we need sane_cancel here in
> normal operation?
I think the intention is to make sure that the backend nows that the
frontend will not ask for any additional images.
What I remember about some discussions with David Mosberger and Andreas B=
is the following example:
we have a scanner that produces several images at the same time.
- sane_start is called the first time =3D> e.g. 10 images are scanned at =
- sane_read until EOF =3D> first image is transmitted to the frontend
- sane_read until EOF =3D> second image is transmitted to the frontend
when the frontend does not ask for more images and does not call sane_can=
then the backend does not know that it can throw awy the last eight image=
so a sane_start indicates: give me more
a sane_cancel indicates: throw away the rest.