Re: sane-0.73 available

Bernd Schroeder (bernd@aquila.muc.de)
Sat, 16 May 1998 14:48:45 +0200

Hi,

On Sat, May 16, 1998 at 12:17:26AM -0700, David Mosberger-Tang wrote:
> Hi everyone,
>
> The latest release, sane-0.73, is finally available. You can find it
> in the usual places, including:

Hhm, it seems that I am some hours too late for an updated version of
the microtek2 backend. Among other things this version applies
the sanei_config_attach_matching_devices() function and this function
caused me some headache for the following reason:

The backend calls the attach() function not only from sane_init(), but
also from sane_get_devices() (and sane_open()). The idea behind the call
to attach() in sane_get_devices() is, that a device might change its state
(become available or unavailable) during a frontend is running.

My imagination was that there might exist a frontend that, for example, calls
sane_get_devices() periodically or offers a "Refresh"-button to always
present an actual list of currently *available* devices. The attach()
call in sane_get_devices() therefore executes INQUIRY and
READ_SCANNER_ATTRIBUTES for devices that were unavailable, when the
frontend started, for example.

With this new function, called during initialization, and the new
format of the configuration file, the only place where the backend sees
the device names is in the callback routine. Now, if a device is
not available when sanei_config_attach_matching_devices() is executed
during initialization, the backend never gets aware of device names of
scanners, that become available later (provided a frontend exists that
executes sane_get_devices later). I think I can get around this, but this
requires some more changes.

The basic question is, if I should remove the attach() call
in sane_get_devices() or not. I went through the code of almost all
other backends and none of them does have this call, so I am unsure if
this is correct at all.

Besides this I think, that I will make available a pre0.2 version of
this backend soon, because the check of the result of the inquiry command
is improved and the "lineart inverted" bug should be fixed.

And just for the record: I have the same problem with the vendor string,
that Matt posted already here, my scanner returns 8 spaces as the
vendor string.

Sorry for the long mail,
Bernd

-- 
Bernd Schroeder 
Email: mailto:bernd@aquila.muc.de
PGP public key available: mailto:pgp@aquila.muc.de | Subject: send key 

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com