Displaying 1 result from an estimated 1 matches for "upstype_t".
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...ype_t *c
sendback(client, "NUMLOGINS %s %d\n", upsname, ups->numlogins);
}
+/* The SIGUSR1 and SIGUSR2 signals to the UPS's are received and remembered
+ by the server on behalf of the UPS's. RP */
+static void get_sigusr1(nut_ctype_t *client, const char *upsname)
+{
+ upstype_t *ups;
+
+ ups = get_ups_ptr(upsname);
+
+ if (!ups) {
+ send_err(client, NUT_ERR_UNKNOWN_UPS);
+ return;
+ }
+
+ if (!ups_available(ups, client))
+ return;
+
+ sendback(client, "SIGUSR1 %s %d\n", upsname, ups->sigusr1);
+ if (ups->sigusr1 > 0) {
+ --(ups->sigusr1); /...