Skip to content

Commit

Permalink
common/state.c: log about not-updating an immutable value [networkups…
Browse files Browse the repository at this point in the history
…tools#266]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jul 22, 2024
1 parent 73cfa9b commit d70353d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
2003 Russell Kroll <[email protected]>
2008 Arjen de Korte <[email protected]>
2012 Arnaud Quette <[email protected]>
2020-2024 Jim Klimov <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -295,6 +296,7 @@ int state_setinfo(st_tree_t **nptr, const char *var, const char *val)

/* changes should be ignored */
if (node->flags & ST_FLAG_IMMUTABLE) {
upsdebugx(6, "%s: not changing immutable variable [%s]", __func__, var);
return 0; /* no change */
}

Expand Down

0 comments on commit d70353d

Please sign in to comment.