Skip to content

Commit e8991fd

Browse files
committed
server/upsd.{c,h}: handle TRACKING value for STAT_CONVERSION_FAILED [networkupstools#2184]
Signed-off-by: Jim Klimov <[email protected]>
1 parent 70782e6 commit e8991fd

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

NEWS.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ https://github.com/networkupstools/nut/milestone/11
8484
* In `cps_fix_report_desc()` we intended to fix-up input and output voltages
8585
in certain cases against high voltage transfer, we only fixed-up one of
8686
them. [#1245]
87+
* `upsd` should now handle `TRACKING` value of `STAT_CONVERSION_FAILED`
88+
introduced in NUT v2.8.2 for the socket protocol (between driver and
89+
data server), by returning "ERR INVALID-ARGUMENT", so there is no change
90+
for the network protocol definition. [#2182]
8791
8892
- SEMVER, know thyself!
8993
* Development iterations of NUT should now identify with not only the

server/upsd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,7 @@ char *tracking_get(const char *id)
13201320
case STAT_UNKNOWN:
13211321
return "ERR UNKNOWN";
13221322
case STAT_INVALID:
1323+
case STAT_CONVERSION_FAILED:
13231324
return "ERR INVALID-ARGUMENT";
13241325
case STAT_FAILED:
13251326
return "ERR FAILED";

server/upsd.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ enum {
8282
STAT_HANDLED = 0, /* completed successfully (NUT_SUCCESS or "OK") */
8383
STAT_UNKNOWN, /* unspecified error (NUT_ERR_UNKNOWN) */
8484
STAT_INVALID, /* invalid command/setvar (NUT_ERR_INVALID_ARGUMENT) */
85-
STAT_FAILED /* command/setvar failed (NUT_ERR_INSTCMD_FAILED / NUT_ERR_SET_FAILED) */
85+
STAT_FAILED, /* command/setvar failed (NUT_ERR_INSTCMD_FAILED / NUT_ERR_SET_FAILED) */
86+
STAT_CONVERSION_FAILED /* STAT_INSTCMD_CONVERSION_FAILED / STAT_SET_CONVERSION_FAILED in drivers/upshandler.h => "ERR INVALID-ARGUMENT" same as STAT_INVALID */
8687
};
8788

8889
/* Commands and settings status tracking functions */

0 commit comments

Comments
 (0)