summaryrefslogtreecommitdiffstats
path: root/src/health.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:27 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:27 +0000
commit6abdfdead1326ccca98dc4cf415c216f1bf25400 (patch)
tree70b803bd499fd45e89627c1b45b90ddf20e8e959 /src/health.c
parentRelease v. 1.8.0+dfsg-1 to Unstable (diff)
parentNew upstream version 1.9.0+dfsg (diff)
downloadnetdata-6abdfdead1326ccca98dc4cf415c216f1bf25400.tar.xz
netdata-6abdfdead1326ccca98dc4cf415c216f1bf25400.zip
Update upstream source from tag 'upstream/1.9.0+dfsg'
Update to upstream version '1.9.0+dfsg' with Debian dir 28b8242a05f9ad26cd1cdbcf078be754fc7d6251
Diffstat (limited to 'src/health.c')
-rw-r--r--src/health.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/health.c b/src/health.c
index 136a1ecd7..dfa7007b9 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: