HomeClusterLabs Projects

Low: libcrmcommon: fix readable interval string

Description

Low: libcrmcommon: fix readable interval string

pcmk__readable_interval() uses static memory for the string, which is
initialized to the empty string the first time it is called. However, later
calls will have the previous result still in the static string, which will
trip the final test for a zero interval. That resulted in log messages such as:

Oct 16 14:31:14 rhel8-1 pacemaker-controld [28714]
(controld_record_pending_op) debug: Recording pending 5s-interval start for
watchdog on rhel8-1 in the CIB

Details

Provenance
kgaillotAuthored on Oct 16 2023, 3:55 PM
Parents
rP95f20904677d: Low: attrd: restore standalone operation for regression testing
Branches
Unknown
Tags
Unknown