how about adding a 1/2 second usleep and an upper bound on the number of tries?
allan On Tue, Oct 7, 2008 at 3:44 PM, stef <stef.dev at free.fr> wrote: > Le Tuesday 07 October 2008 10:29:21 Julien BLACHE, vous avez ?crit : >> stef <stef.dev at free.fr> wrote: >> >> Hi, >> >> > +#if SANE_CURRENT_MINOR >= 1 >> > + do >> > + { >> > + status = sane_start(dev); >> > + } while (status == SANE_STATUS_WARMING_UP); >> > +#else >> >> Please, tell me this is not busy-looping on sane_start() ... >> >> JB. > > Hello, > > sorry can't tell you that. It is indeed doing busy-looping. While it > works > fine with the pnm backend and the rts8891 which handles warming-up, adding a > sleep() in the loop would be better. However, this will have to be replaced > with some dialog box, which is the reason there is a SANE_STATUS_WARMING_UP. > It is currently a quick fix to make XSane work with SANE 1.1. > > Regards, > Stef > > -- > 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"