[sane-devel] "Scanimage" or "Sane" timeouts

Louis Lagendijk louis at fazant.net
Sat Apr 6 11:18:13 BST 2019


On Sat, 2019-04-06 at 10:44 +0200, Dr Rainer Woitok wrote:
> Olaf,
> 
> On Saturday, 2019-04-06 15:27:47 +0900, you wrote:
> 
> > ...
> > >    bjnp-timeout=100
> > >    bjnp://192.168.2.199/timeout=5000
> > >    bjnp-timeout=100
> > 
> > According to the manual page, the first line has effect.  The
> > second is
> > only applied for the scanner at that IP address.  Everything else
> > uses
> > the last bjnp-timeout value.
> 
> That was exactly my intention.   The 5000 milliseconds timeout was
> sugg-
> ested by Louis because the scanner is connected via WiFi.  But even
> with
> these specifications  former versions of "scanimage" stubbornly
> produced
> six timeouts of 1000 milliseconds each,  so I suspect  even former
> vers-
> ions misinterpreted the default value  as a minimum as you point out
> be-
> low.
> 
> > ...
> > I had a quick look at the code in backend/pixma_bjnp.c.
> > ...
> >    min_timeout = /* assign value from configuration file */
> >    if (min_timeout < BJNP_TIMEOUT_DEFAULT)
> >       min_timeout = BJNP_TIMEOUT_DEFAULT;
> 
> So the code clearly contradicts the documentation.  I would vote in
> fav-
> our of the documentation  and would prefer  the default value to be
> only
> assigned, if the configuration files don't provide any timeout
> values.
> 
> Thanks, Olaf, for pointing this out.
> 
> Sincerely,
>   Rainer
I gave in to the many requests to increase the default, something I had
rejected for a long time. I will reconsider the changes and see if I
can find a better solution and if not revert the change. The argument
was that on WIFI longer timeouts do occur, and increasing the time out
would not affect others. It apparently does affect others, so the
change is not warranted as is. 
Will have a look at it some time next week

BR, Louis




More information about the sane-devel mailing list