[sane-devel] sane_set_io_mode and sane_get_select_fd

Jeffrey Ratcliffe jeffrey.ratcliffe at gmail.com
Mon Sep 8 19:41:21 UTC 2008


2008/9/8 m. allan noah <kitno455 at gmail.com>:
> "Setting non-blocking option... Invalid argument"
>
> the option did not get set, so it cant be true inside the function.
> maybe crank up the debug level on the test backend?

Ah. Didn't realise you could do that.

export SANE_DEBUG_TEST=4

The relevant part of the output now looks like this:

start... Success
[test] sane_control_option: handle=0x804dfa8, opt=19, act=1,
val=0xbffa0470, info=0xbffa0468
[test] sane_control_option: is scanning
Setting non-blocking option... Invalid argument
[test] sane_set_io_mode: handle = 0x804dfa8, non_blocking = 1
Setting non-blocking... Operation not supported
[test] sane_control_option: handle=0x804dfa8, opt=20, act=1,
val=0xbffa0470, info=0xbffa0468
[test] sane_control_option: is scanning
Setting fd option... Invalid argument
[test] sane_get_select_fd: handle = 0x804dfa8, fd != 0
Setting fd... Operation not supported
[test] sane_close: handle=0x804dfa8

If I comment out the sane_start call, it becomes:

opening test... Success
[test] sane_control_option: handle=0x804dfa8, opt=19, act=1,
val=0xbfb2c000, info=0xbfb2bff8
[test] sane_control_option: set option 19 (non-blocking) to true
[test] sane_control_option: finished, info=
Setting non-blocking option... Success
[test] sane_set_io_mode: handle = 0x804dfa8, non_blocking = 1
[test] sane_set_io_mode: not scanning
Setting non-blocking... Invalid argument
[test] sane_control_option: handle=0x804dfa8, opt=20, act=1,
val=0xbfb2c000, info=0xbfb2bff8
[test] sane_control_option: set option 20 (select-fd) to true
[test] sane_control_option: finished, info=
Setting fd option... Success
[test] sane_get_select_fd: handle = 0x804dfa8, fd != 0
[test] sane_get_select_fd: not scanning
Setting fd... Invalid argument
[test] sane_close: handle=0x804dfa8

But I'm still no wiser. Any ideas?

Or do you have some example code that uses sane_set_io_mode or
sane_get_select_fd?
				
Jeff



More information about the sane-devel mailing list