[sane-devel] sane_cancel on HP 5590

m. allan noah kitno455 at gmail.com
Tue Feb 26 19:41:07 UTC 2008


sane_cancel is meant to be called asynchronously, so it probably
should not send any commands to the scanner.
sane_read should probably check a 'no longer scanning' flag, and do
whatever cleanup is required.

take it away Ilia :)

allan

On Tue, Feb 26, 2008 at 11:39 AM, tobias alarcon <extobias at gmail.com> wrote:
> Hi all,
>
>  I am trying to cancel a page scan. so i call sane_cancel while
>  scanning is in progress
>  but the application get stuck on the next sane_read,
>  instead of return SANE_STATUS_CANCELLED
>
>  this its what i get from debugging
>
>  [hp5590] sane_hp5590_read, length 850, left 538900
>  [hp5590] hp5590_read
>  [hp5590] hp5590_bulk_read
>  [hp5590] hp5590_bulk_read: USB-in-USB: not enough data in buffer
>  available (available: 602, requested: 850)
>  [hp5590] hp5590_bulk_read: USB-in-USB: total pages done: 8
>  [hp5590] hp5590_bulk_read: USB-in-USB: sending USB-in-USB bulk flags
>  [hp5590] hp5590_bulk_read: USB-in-USB: checking confirmation for bulk flags
>  [hp5590] hp5590_get_ack
>  [hp5590] hp5590_get_ack: USB-in-USB: accepted
>  [hp5590] hp5590_bulk_read: USB-in-USB: sending control msg for bulk
>  [hp5590] hp5590_bulk_read: USB-in-USB: checking if control msg was accepted
>  [hp5590] hp5590_get_ack
>  [hp5590] hp5590_get_ack: USB-in-USB: accepted
>  [hp5590] hp5590_bulk_read: USB-in-USB: bulk reading 65536 bytes
>  [hp5590] sane_hp5590_cancel
>  [hp5590] hp5590_low_free_bulk_read_state
>  [hp5590] hp5590_low_free_bulk_read_state: USB-in-USB: freeing bulk read state
>  [hp5590] hp5590_stop_scan
>  [hp5590] hp5590_cmd: USB-in-USB: command : 011b
>  [hp5590] hp5590_control_msg: USB-in-USB: core data: no
>  [hp5590] hp5590_control_msg: USB-in-USB: sending control msg
>  [hp5590] hp5590_control_msg: USB-in-USB: checking acknowledge for
>  control message
>  [hp5590] hp5590_get_ack
>  [hp5590] hp5590_get_ack: USB-in-USB: accepted
>  [hp5590] hp5590_control_msg: USB-in-USB: checking if data was accepted
>  [hp5590] hp5590_get_ack
>  [hp5590] hp5590_get_ack: USB-in-USB: accepted
>  [hp5590] hp5590_control_msg: USB-in-USB: getting response
>  [hp5590] hp5590_control_msg: USB-in-USB: invalid response received
>  (needed 0000, got 00e3)
>
>  thanks in advance
>  Tobias
>
>  --
>  sane-devel mailing list: sane-devel at lists.alioth.debian.org
>  http://lists.alioth.debian.org/mailman/listinfo/sane-devel
>  Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to sane-devel-request at lists.alioth.debian.org
>



-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list