diff options
author | Timo <timotej@netdata.cloud> | 2020-01-09 18:51:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-09 18:51:46 +0200 |
commit | 2c0f57151e09b6eda008181912fb891e0a471544 (patch) | |
tree | c846365b5add63daee8a51acd12bfea9ca1a5666 /database/rrdhost.c | |
parent | 791e7e713db07d37f7eca844dad8369ac92dc5ee (diff) |
error exit when rrdhost localhost init fails #7504 (#7663)
* error exit when rrdhost localhost init fails #7504
Diffstat (limited to 'database/rrdhost.c')
-rw-r--r-- | database/rrdhost.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c index 150596671f..df4e364d9b 100644 --- a/database/rrdhost.c +++ b/database/rrdhost.c @@ -483,7 +483,7 @@ restart_after_removal: // ---------------------------------------------------------------------------- // RRDHOST global / startup initialization -void rrd_init(char *hostname, struct rrdhost_system_info *system_info) { +int rrd_init(char *hostname, struct rrdhost_system_info *system_info) { rrdset_free_obsolete_time = config_get_number(CONFIG_SECTION_GLOBAL, "cleanup obsolete charts after seconds", rrdset_free_obsolete_time); gap_when_lost_iterations_above = (int)config_get_number(CONFIG_SECTION_GLOBAL, "gap when lost iterations above", gap_when_lost_iterations_above); if (gap_when_lost_iterations_above < 1) @@ -517,6 +517,7 @@ void rrd_init(char *hostname, struct rrdhost_system_info *system_info) { ); rrd_unlock(); web_client_api_v1_management_init(); + return localhost==NULL; } // ---------------------------------------------------------------------------- |