snmp-ups: add ability to set TimeTicks correctly (#687)
* snmp-ups: add ability to set TimeTicks correctly
Driver had been setting read/write parameters as
either Integer or String, but OIDs that expect
TimeTicks cannot be set using an Integer.
snmp-ups already supported getting TimeTicks
correctly and had helper functions for setting
TimeTicks, but logic had not been implemented in
su_setOID().
* Missing semicolon ;-(
* snmp-ups: use NUT's str_to_long() in su_setOID()
Safer conversion from provided strings to instant
command or read/write value. Omitted default value
if !SU_MODE_INSTCMD because it is not possible for
read/write variable functions to be called without
a value (unlike instant commands).
* Makefile.am : do not shellcheck/spellcheck by default as it can fail for external circumstances (e.g. missing tools)
* Makefile.am : visibly separate the "check-scripts-syntax" implementation (with current system shells) vs "shellcheck" which may get impemented differently (with external tools) in later iterations
* Makefile.am : clarify the check-scripts-syntax vs shellcheck comment
* .travis.yml and ci_build.sh : leave TBDs for future shellcheck tool integration
* ci_build.sh : call both shellcheck and check-scripts-syntax targets; it does not duplicate the work and reports while one calls another for now - and will do two tests when they become independent
Problem: isdigit() receives a char* instead of char (#690)
Solution: as a quick fix, pick the first char of the string we pass.
The proper fix would be to use the str_*() API for safe conversions,
in a later iteration.
f745a34...
by
Arnaud Quette <email address hidden>
Refresh firmware information for Eaton/HPE devices
Despite the static nature of these data, firmware can be updated by various
means, and should thus be refreshed by the driver, without needing a driver
restart. A "semi static" approach should be done in the end, as in usbhid-ups,
but is not part of the present development, though commented in the code.
For the time being, simply remove the STATIC flags to refresh the data
(snmp-ups) and allow to refresh product information (netxml-ups)