-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2010?12?06? 08:47, Olaf Meeuwissen wrote:
> [...]  In case of an FSG_STATUS_FER or
> FSG_STATUS_NOT_READY one should not request any image data anymore and
> that is what the backend seems to be doing.  However, in case you get an
> FSG_STATUS_CANCEL_REQ you have to send a CAN.  The backend only sets the
> SANE_STATUS_CANCELLED flag and returns.  As a result e2_scan_finish gets
> called but that doesn't send a CAN.
> 
> Obviously, e2_scan_finish cannot know that it should.  So I'd make
> e2_ext_read send the CAN (by calling e2_cancel) before it returns
> SANE_STATUS_CANCELLED.

Untested patch attached.
- -- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz9dLwACgkQt5qrxaZLMnLFsQCgkwyuf27Au6KIeG0995kaqhEX
y74AnRl0F0XPisnXOw8jTslD856QcxdP
=+bQd
-----END PGP SIGNATURE-----
diff --git a/backend/epson2-ops.c b/backend/epson2-ops.c
index 7db3001..25a4183 100644
--- a/backend/epson2-ops.c
+++ b/backend/epson2-ops.c
@@ -1721,6 +1721,7 @@ e2_ext_read(struct Epson_Scanner *s)
 
 		if (s->buf[buf_len] & FSG_STATUS_CANCEL_REQ) {
 			DBG(0, "%s: cancel request received\n", __func__);
+			e2_cancel(s);
 			return SANE_STATUS_CANCELLED;
 		}
 

Attachment: e2_ext_read-cancellation.diff.sig
Description: Binary data

Reply via email to