Displaying 1 result from an estimated 1 matches for "validate_upsconf".
2010 Jul 21
1
[PATCH] nut crashes when port= is omitted
...or value.
How to reproduce this crash:
1)add ups to ups.conf, omit port configuration
2)run upsdrvctl stop
There is nothing checking ups configuration is ok for upsdrvctl. For daemon
there is check in server/conf.c upsconf_add. I've moved that checking code to
separate function upsconf.c : validate_upsconf and used this function from
upsconf_add and from upsdrvctl.c , this was more intrusive than it seemed. See
attached patch (tested). Simpler way would be just adding validate_upsconf to
upsdrvctl.c but it'd lead to code duplication. Any comments?
Michal
-------------- next part -------------...