Hi Chris,<br><br><div class="gmail_quote">2011/5/20 Chris Adams <span dir="ltr"><<a href="mailto:cmadams@hiwaay.net">cmadams@hiwaay.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Once upon a time, Arnaud Quette <<a href="mailto:aquette.dev@gmail.com">aquette.dev@gmail.com</a>> said:<br>
> time has come for a new NUT release: I'm planning on 2.6.1 next week (max<br>
> Friday 27), and I'm currently processing remaining patches.<br>
> If you have some more on your side, please send in.<br>
<br>
</div>I need the following patch for NUT to work with my older PowerWare 9315.<br>
According to the docs linked from the NUT website, some of the info is<br>
only returned on newer models/firmware, and the only way to tell is to<br>
check the length of the returned data.  The current bcmxcp driver<br>
assumes everything is there and reads off the end of the returned data.<br>
<br>
This patch checks the length before trying to read the newer items.  I<br>
generated it against nut 2.4.3 because that's the version I'm running<br>
(on a RHEL server, pulling from Fedora EPEL), but it looks like that<br>
code has not changed in 2.6.<br clear="all"></blockquote><div><br>I've just applied it on the trunk (r3005), bumping both driver and serial sub-driver versions.<br><br>Thanks for your contribution.<br>Arnaud<br></div>
</div>-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://powerquality.eaton.com" target="_blank">http://powerquality.eaton.com</a><br>Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>
Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br><br>