[Nut-upsdev] [nut-commits] svn commit r1417 - in trunk: . drivers

Arnaud Quette aquette.dev at gmail.com
Mon Apr 7 07:48:57 UTC 2008


2008/4/6, Arjen de Korte <nut+devel at de-korte.org>:
>
>  > - drivers/dstate-hal.[ch]: added sleep here, to limit the polling rate
>  > (previously, the driver would completely ignore the poll interval and
>  > would run upsdrv_updateinfo() without any delay in between)
>  >
>  > The changes to dstate-hal.[ch] should probably be backported to Testing
>  > ASAP, since ignoring the poll_interval is not a good idea (you'll be
>  > basically polling the UPS in a continuous loop, without any delays)
>
>
> The above is not true, I should have looked in main-hal.c before making
>  all this noise. The function isn't used, so it is pretty irrelevant what
>  is done inside it. Having said that, it probably is a better idea strip
>  excess stuff from main-hal.c instead of creating empty placeholders that
>  will never be called anyway. I will handle this as soon as my sweep
>  through the code gets to that point (currently still busy cleaning up
>  clients).

the sleep is not needed.
part of my recent changes on this, I've switched to using gmain.
And the call to upsdrv_updateinfo() are now wrapped into the callback
update_data() which is still called at poll_interval frequency...

thanks for having looked at that though ;-)

Arnaud
-- 
Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
Free Software Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsdev mailing list