[sane-devel] sane or iscan bug?

Igor Kofman kofman at tambuka.net
Thu Nov 21 07:38:08 GMT 2002


Hey,

I installed sane (debian-unstable version) and iscan 1.4.0 from source. 
Sane tools work, but iscan, as soon as I hit preview or scan starts to
talk to the scanner but then displays a "Can't send command to scanner"
error.

I tracked it down to a gamma option update call that locates the
option_id, 8 of the option and then calls this:

void sane_scan::set_value ( char * option_name, void * value )
 455 {
 456   SANE_Status   status;
 457   int           option_id;
 458 
 459   option_id = get_option_id ( option_name );
 460 
 461   status = ::pisa_sane_control_option ( m_hdevice,
 462                                         option_id,
 463                                         SANE_ACTION_SET_VALUE,
 464                                         value,
 465                                         0 );
 466   
 467   if ( status != SANE_STATUS_GOOD )
 468     throw pisa_error ( PISA_ERR_CONNECT );
 469 }

which calls:

SANE_Status pisa_sane_control_option ( SANE_Handle handle, SANE_Int
option,
  71                                       SANE_Action action, void *
value,
  72                                       SANE_Int * info )
  73 {
  74   return sane_control_option ( handle, option, action, value, info
);
  75 }
  76 

option_id is = 8 before the call and = 4 after the call (the call failed
and returns a SANE_STATS_INVAL).. how's that even possible given it's an
int??  I am probably missing something, but let me know what I should
look for... I'll keep looking into this.  Btw, previous calls to
sane_control_option work just fine and i have an epson 1240u.

Thanks, let me know any suggestions,
ik
-- 
Igor Kofman <kofman at tambuka.net>




More information about the sane-devel mailing list