Configuring a red alert for: Machine recently rebooted
list Martin Müller
Fri, 29 May 2020 14:00:22 +0200
Message-Id: <user-ab908c174c0a@xymon.invalid>
Hello,
It seems that the function durationvalue in timefunc.c does not handle
negative values. (Which seems pretty reasonable). I'm not sure if we
ever need negative durations other than -1. Anyway I worked around this
by adding:
int sign = 1;
if( *dur ='-' ) {
startofval = dur+1;
sign=-1;
}else{
startofval = dur;
}
to the start of the function and returning:
result*sign;
Cheers
Martin