Skip to content

Commit

Permalink
server/netget.c: get_type(): report assuming UPS[%s] variable %s is a…
Browse files Browse the repository at this point in the history
… NUMBER to help catch code that did not set the flags [networkupstools#266]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jul 22, 2024
1 parent d01a3d4 commit 00c9f0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/netget.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ static void get_type(nut_ctype_t *client, const char *upsname, const char *var)
/* Any variable that is not string | range | enum is just a simple
* numeric value */

if (!(node->flags & ST_FLAG_NUMBER)) {
upsdebugx(3, "%s: assuming UPS[%s] variable %s is a NUMBER",
__func__, upsname, var);
}

sendback(client, "%s NUMBER\n", buf);
}

Expand Down

0 comments on commit 00c9f0d

Please sign in to comment.