From 177af26ea878e673166ebbeb4518539f624a81f0 Mon Sep 17 00:00:00 2001 From: Vladimir Kobal Date: Sat, 1 Feb 2020 00:05:45 +0200 Subject: Parse host tags (#7702) * Fix memory leaks * Check for configuration options * Parse simple tags * Parse JSON tags * Remove an unnecessary check * Parse a JSON object * Parse a JSON array * Update the documentation * Fix host locks --- streaming/rrdpush.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'streaming') diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c index f110a4c92a..59ae0b1537 100644 --- a/streaming/rrdpush.c +++ b/streaming/rrdpush.c @@ -347,6 +347,7 @@ void rrdpush_send_labels(RRDHOST *host) { return; rrdpush_buffer_lock(host); + rrdhost_rdlock(host); netdata_rwlock_rdlock(&host->labels_rwlock); struct label *labels = host->labels; @@ -364,6 +365,7 @@ void rrdpush_send_labels(RRDHOST *host) { , "OVERWRITE %s\n", "labels"); netdata_rwlock_unlock(&host->labels_rwlock); + rrdhost_unlock(host); if(host->rrdpush_sender_pipe[PIPE_WRITE] != -1 && write(host->rrdpush_sender_pipe[PIPE_WRITE], " ", 1) == -1) error("STREAM %s [send]: cannot write to internal pipe", host->hostname); -- cgit v1.2.3