Arjen de Korte
2008-Apr-06 16:34 UTC
[Nut-upsdev] [nut-commits] svn commit r1417 - in trunk: . drivers
> - 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). Best regards, Arjen -- Eindhoven - The Netherlands Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
Arnaud Quette
2008-Apr-07 07:48 UTC
[Nut-upsdev] [nut-commits] svn commit r1417 - in trunk: . drivers
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/