search for: upsconf_add

Displaying 2 results from an estimated 2 matches for "upsconf_add".

2010 Jul 21
1
[PATCH] nut crashes when port= is omitted
...ng configuration. During quick testing I did not find any other sensitive place 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...
2007 May 18
1
i'm confused
...looked at the code for and found that in drivers/dstate.c dstate_init function creates the socket as follows - snprintf(sockname, sizeof(sockname), "%s/%s-%s", dflt_statepath(), prog, port); which is fine, but if i'm right upsd via server/conf.c in function upsconf_add is trying set the name of the socket to be opened as - snprintf(statefn, sizeof(statefn), "%s", tmp->upsname); so it error's as above. If i call the entry in ups.conf 'apcsmart-ttyS0' then it'll work because upsd will use the upsname,...