[sane-devel] Doubt about sane_get_devices
m. allan noah
kitno455 at gmail.com
Mon Apr 28 00:58:56 UTC 2008
On 4/26/08, m. allan noah <kitno455 at gmail.com> wrote:
> well, it appears that the sanei_usb support library intentionally does
> not re-gather the list of devices. This makes sense in the average
> sane installation, cause dozens of backends each gather the list
> within a fraction of a second, as the dll backend cycles thru them.
> in your case, it is the wrong behaviour, since the long-running daemon
> needs to know the list has changed. I think i can change the current
> code to retry occasionally.
I have just committed a fix to sanei_usb_init() which will run the
probe at most once per second, instead of once per process. The
backend must call sanei_usb_init() during sane_get_devices(), which
required an update to the fujitsu backend. This fixes the hotplugging
problem for me.
However, it does not yet fix the hot _UN_ plugging problem, as the
fujitsu backend does not yet prune removed devices from the list. That
is a more invasive change, so i need to test it some.
Other backends likely need these two changes done as well, I've not looked.
"The truth is an offense, but not a sin"
More information about the sane-devel