XML-API icon indicating copy to clipboard operation
XML-API copied to clipboard

sysvarlist.cgi Retrieve min/max values only when sysvar is numeric

Open Michael-K-at-GitHub opened this issue 4 years ago • 2 comments

min and max values are only requested if ValueType = 4 (numeric). This prevents Rega Log Entries "metadata property 'MIN' does not exist" and "metadata property 'MAX' does not exist" for every nonnumeric sysvar every time sysvarlist.cgi is called.

Fixes Issue #45

Michael-K-at-GitHub avatar Oct 29 '20 17:10 Michael-K-at-GitHub

Thanks for the PR. However, two things remain:

  1. The log entries in /var/log/messages caused by ReGaHss are pure INFO entries, thus you can simply ignore them.
  2. How about the other value types? You just catch value type 4 which in fact is ivtFloat. But how sure are you that there are not other Value Types you have to catch?

jens-maus avatar Nov 03 '20 12:11 jens-maus

ad 1) that's correct. It's simply a matter of calling functions that we know will fail, so we could save cpu per not doing so ad 2) at least the web interface offers only one datatype for sysvars with a min/max entry. But maybe there are other types of sysvars which are created elsewhere. I do not have enough insight and knowledge to give a definitive answer.

Michael-K-at-GitHub avatar Nov 08 '20 12:11 Michael-K-at-GitHub