List Info

Thread: xsane hpaio with ADF bug report and PATCH




xsane hpaio with ADF bug report and PATCH
user name
2006-09-16 16:13:50
The attached one-line patch against xsane-0.991 is needed
to get the automatic document feeder on my OfficeJet 5610
to work with xsane. The problem is that xsane does not
call "sane_cancel" after scanning a page from
the ADF, and
the page is then not properly ejected. 

scanimage already does the right thing and  works with my
scanner. So I think the problem is with xsane. From looking
at various mailing lists, it seems that it affects at least
some of the other hpaio devices. 

Is this the right place to report this?

--- src/xsane-scan.c.orig       2006-09-15
20:50:56.000000000 -0500
+++ src/xsane-scan.c    2006-09-15 20:53:00.000000000 -0500
 -1560,6
+1560,7 

     DBG(DBG_info, "ADF mode end of scan: increment
page counter and restart
scan\n");
     xsane.adf_page_counter += 1;
+    sane_cancel(xsane.dev);
     gtk_timeout_add(100, (GtkFunction)xsane_scan_dialog,
NULL); /* wait 100ms
then call xsane_scan_dialog(); */
   }
   else if ( ( (status == SANE_STATUS_GOOD) || (status ==
SANE_STATUS_EOF) ) &&
(xsane.batch_loop  == BATCH_MODE_LOOP) )


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 

-- 
sane-devel mailing list: sane-devellists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
             to sane-devel-requestlists.alioth.debian.org
xsane hpaio with ADF bug report and PATCH
user name
2006-09-16 17:46:40
quoting David Mosberger-Tang:

> In other words, the idea is to have sane_start() be
called, and
> collect as many images as the frontend wants (which
could in turn
> consist of multiple frames each as indicated by
frame-type) and
> when the frontend is done, it should call
sane_cancel().

this has subsequently been interpretted as:

* the following call sequence: sane_start; sane_read (repeat
until
* EOF); sane_start; sane_read...  and then call sane_cancel
if the
* batch is at an end. I.e. do not call sane_cancel during
the run but
* as soon as you get a SANE_STATUS_NO_DOCS.

sane_cancel should only be called at the end of the batch,
not between 
pages. XSANE is correct. i bet you are using scanimage from
sane 
1.0.17 or before, as the version that is part of sane 1.0.18
no longer has 
this problem.

bug in hpaio, imho.

allan

On Sat, 16 Sep 2006, Alex Eskin wrote:

>
> The attached one-line patch against xsane-0.991 is
needed
> to get the automatic document feeder on my OfficeJet
5610
> to work with xsane. The problem is that xsane does not
> call "sane_cancel" after scanning a page
from the ADF, and
> the page is then not properly ejected.
>
> scanimage already does the right thing and  works with
my
> scanner. So I think the problem is with xsane. From
looking
> at various mailing lists, it seems that it affects at
least
> some of the other hpaio devices.
>
> Is this the right place to report this?
>
> --- src/xsane-scan.c.orig       2006-09-15
20:50:56.000000000 -0500
> +++ src/xsane-scan.c    2006-09-15 20:53:00.000000000
-0500
>  -1560,6 +1560,7 
>
>     DBG(DBG_info, "ADF mode end of scan:
increment page counter and restart
> scan\n");
>     xsane.adf_page_counter += 1;
> +    sane_cancel(xsane.dev);
>     gtk_timeout_add(100,
(GtkFunction)xsane_scan_dialog, NULL); /* wait 100ms
> then call xsane_scan_dialog(); */
>   }
>   else if ( ( (status == SANE_STATUS_GOOD) || (status
== SANE_STATUS_EOF) ) &&
> (xsane.batch_loop  == BATCH_MODE_LOOP) )
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
protection around
> http://mail.yahoo.com
>
>

-- 
"so don't tell us it can't be done, putting down
what you don't know.
money isn't our god, integrity will free our souls" -
Max Cavalera

-- 
sane-devel mailing list: sane-devellists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
             to sane-devel-requestlists.alioth.debian.org
xsane hpaio with ADF bug report and PATCH
user name
2006-09-16 20:09:42
Alex Eskin wrote:
> The attached one-line patch against xsane-0.991 is
needed
> to get the automatic document feeder on my OfficeJet
5610
> to work with xsane. The problem is that xsane does not
> call "sane_cancel" after scanning a page
from the ADF, and
> the page is then not properly ejected.

this is a bug in the backend, but not in xsane. The funny
thing is
that the Python module for Sane in the Pythin Imaging
Library had to
be fixed a few months ago so that sane_cancel is _not_
automatically
called after every scan. If a frontend calls sane_cancel
after every
scan, it can't read the backside data from duplex scanners
supported
at least by the avision backend. This backend (and probably
others)
discard the buffered backside data from a duplex scan in the
sane_cancel call -- an absolutely reasonable and legitimate
behaviour.

> scanimage already does the right thing and  works with
my
> scanner. So I think the problem is with xsane. From
looking
> at various mailing lists, it seems that it affects at
least
> some of the other hpaio devices.
>
> Is this the right place to report this?

uhhh, yes and no ;) I don't know, if Oliver runs a separate
mailing
list for XSane, but anyway: you should tell the hpaio
developers
about the problem and ask them for a fix.

Abel

-- 
sane-devel mailing list: sane-devellists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
             to sane-devel-requestlists.alioth.debian.org
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )