[sane-devel] "Scanimage" or "Sane" timeouts
paddy-hack at member.fsf.org
Sat Apr 6 07:27:47 BST 2019
I'm not familiar with the pixma backend but can read the manual page and
the code ;-)
Dr Rainer Woitok writes:
> But apart from these error messages "scanimage" eventually connected to
> the scanner because configuration file "pixma.conf" contained the lines:
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.
> But from these three lines aparently only the IP address was noted while
> the timeouts were ignored. However, back last June the problem of ig-
> nored timeouts was laid aside and we totally focused on the network iss-
> ues. I could live with that because "scanimage" just went through six
> timeouts of 1000 milliseconds each before it finally started.
> However, since some recent change the default timeout has been increased
> from 1000 milliseconds to 10000 milliseconds, causing a delay of a solid
> minute before "scanimage" gets going. That's just too much now, and I'm
> frantically looking for a way to change the default timeout.
That change happened in 155248dde28b2a9ec4114d59dc294b69b3260142 and was
made by Louis on 2019-03-27.
> Anybody knows where to look? Any pointers appreciated.
I had a quick look at the code in backend/pixma_bjnp.c. I have checked
that it implements the logic documented in the manual page but the
following bit of code, which can be found for both the IP address case
as well as the bjnp-timeout value, caught my attention:
min_timeout = /* assign value from configuration file */
if (min_timeout < BJNP_TIMEOUT_DEFAULT)
min_timeout = BJNP_TIMEOUT_DEFAULT;
So rather than a default, the 10000ms "default" is really a minimum
value. I'm afraid that Louis overlooked that when he changed things.
@Louis: I suggest you revert that commit and tell people to set a larger
value in their configuration file if they need it. Local nets
should be fast enough to reply within a second, if you ask me.
Perhaps you should also rename the macro :-)
Hope this helps,
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
More information about the sane-devel