X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Frrdpush.c;h=87c4309a2f546d7bff85c195c7d8f707395c0f63;hb=68c6d537788b9c11670903bce2e9806933a3322a;hp=f5f54d39a320e8158b2b7df2d4921510a0a6c1bc;hpb=a00c8217dca7180462a470c1a3a5d883e6069af4;p=netdata.git diff --git a/src/rrdpush.c b/src/rrdpush.c index f5f54d39..87c4309a 100644 --- a/src/rrdpush.c +++ b/src/rrdpush.c @@ -33,7 +33,7 @@ int rrdpush_init() { default_rrdpush_enabled = appconfig_get_boolean(&stream_config, CONFIG_SECTION_STREAM, "enabled", default_rrdpush_enabled); default_rrdpush_destination = appconfig_get(&stream_config, CONFIG_SECTION_STREAM, "destination", ""); default_rrdpush_api_key = appconfig_get(&stream_config, CONFIG_SECTION_STREAM, "api key", ""); - rrdhost_free_orphan_time = appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "free orphan hosts after seconds", rrdhost_free_orphan_time); + rrdhost_free_orphan_time = config_get_number(CONFIG_SECTION_GLOBAL, "cleanup orphan hosts after seconds", rrdhost_free_orphan_time); if(default_rrdpush_enabled && (!default_rrdpush_destination || !*default_rrdpush_destination || !default_rrdpush_api_key || !*default_rrdpush_api_key)) { error("STREAM [send]: cannot enable sending thread - information is missing."); @@ -59,8 +59,8 @@ int rrdpush_init() { // this is for the first iterations of each chart static unsigned int remote_clock_resync_iterations = 60; -#define rrdpush_lock(host) pthread_mutex_lock(&((host)->rrdpush_mutex)) -#define rrdpush_unlock(host) pthread_mutex_unlock(&((host)->rrdpush_mutex)) +#define rrdpush_lock(host) netdata_mutex_lock(&((host)->rrdpush_mutex)) +#define rrdpush_unlock(host) netdata_mutex_unlock(&((host)->rrdpush_mutex)) // checks if the current chart definition has been sent static inline int need_to_send_chart_definition(RRDSET *st) {