diff options
Diffstat (limited to 'src/health.c')
-rw-r--r-- | src/health.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/health.c b/src/health.c index 136a1ecd..dfa7007b 100644 --- a/src/health.c +++ b/src/health.c @@ -34,10 +34,10 @@ void health_reload_host(RRDHOST *host) { rrdhost_wrlock(host); while(host->templates) - rrdcalctemplate_free(host, host->templates); + rrdcalctemplate_unlink_and_free(host, host->templates); while(host->alarms) - rrdcalc_free(host, host->alarms); + rrdcalc_unlink_and_free(host, host->alarms); rrdhost_unlock(host); @@ -84,7 +84,7 @@ void health_reload(void) { // ---------------------------------------------------------------------------- // health main thread and friends -static inline int rrdcalc_value2status(calculated_number n) { +static inline RRDCALC_STATUS rrdcalc_value2status(calculated_number n) { if(isnan(n) || isinf(n)) return RRDCALC_STATUS_UNDEFINED; if(n) return RRDCALC_STATUS_RAISED; return RRDCALC_STATUS_CLEAR; @@ -189,7 +189,6 @@ static inline void health_alarm_execute(RRDHOST *host, ALARM_ENTRY *ae) { done: health_alarm_log_save(host, ae); - return; } static inline void health_process_notifications(RRDHOST *host, ALARM_ENTRY *ae) { @@ -537,8 +536,8 @@ void *health_main(void *ptr) { if(unlikely(!(rc->rrdcalc_flags & RRDCALC_FLAG_RUNNABLE))) continue; - int warning_status = RRDCALC_STATUS_UNDEFINED; - int critical_status = RRDCALC_STATUS_UNDEFINED; + RRDCALC_STATUS warning_status = RRDCALC_STATUS_UNDEFINED; + RRDCALC_STATUS critical_status = RRDCALC_STATUS_UNDEFINED; // -------------------------------------------------------- // check the warning expression @@ -605,7 +604,7 @@ void *health_main(void *ptr) { // -------------------------------------------------------- // decide the final alarm status - int status = RRDCALC_STATUS_UNDEFINED; + RRDCALC_STATUS status = RRDCALC_STATUS_UNDEFINED; switch(warning_status) { case RRDCALC_STATUS_CLEAR: |