[sane-devel] sane_get_devices() questions

m. allan noah kitno455 at gmail.com
Sun May 31 21:58:41 UTC 2009


there was a bug in sanei_usb which prevented sane from discovering
newly added scanners. This was fixed in 1.0.20. Unfortunately, some
backends only ask the system for a list of scanners during
sane_init(). I fixed mine, but I bet other backends are still broken
in this regard. Which backend/scanner is this?

allan

2009/5/31 Kåre Särs <kare.sars at iki.fi>:
> Hi,
>
> I have an unexpected behavior with sane_get_device(). In the standard (1.04)
> it states (4.3.3) "This function can be called repeatedly to detect when new
> devices become available". From that I expected that this sequence would work:
>
> sane_init(version, 0);
> sane_get_device(&device_list, SANE_TRUE);
> ...
> sane_get_device(&device_list, SANE_TRUE);
> ...
> sane_get_device(&device_list, SANE_TRUE);
> sane_exit();
>
> but the result is that, no mater if a scanner is added/removed, the list stays
> the same as the first one.
>
> This following sequence does update the list, but is not really what I wanted:
>
> sane_init(version, 0);
> sane_get_device(&device_list, SANE_TRUE);
> sane_exit();
> ...
> sane_init(version, 0);
> sane_get_device(&device_list, SANE_TRUE);
> sane_exit();
> ...
> sane_init(version, 0);
> sane_get_device(&device_list, SANE_TRUE);
> sane_exit();
>
>
> The questions:
> 1) Have I missed something or is this just the way it works? (If this is the
> way it "should" work, there could be a clarifying sentence about it in the
> standard.)
>
> 2) Is there a way to avoid calling sane_exit()?
>
> Thanks in advance,
>  Kåre
>
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>             to sane-devel-request at lists.alioth.debian.org
>



-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list