diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-02-01 00:05:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-01 00:05:45 +0200 |
commit | 177af26ea878e673166ebbeb4518539f624a81f0 (patch) | |
tree | 9f874527a1e6e25c85a05d62b3623e6d8b5f79fd /exporting/opentsdb/opentsdb.c | |
parent | 43bc627b1dc2e667ad2e6e8a0c2ff1e0b512dcdf (diff) |
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
Diffstat (limited to 'exporting/opentsdb/opentsdb.c')
-rw-r--r-- | exporting/opentsdb/opentsdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c index a1e810de93..75ecaa7a43 100644 --- a/exporting/opentsdb/opentsdb.c +++ b/exporting/opentsdb/opentsdb.c @@ -119,6 +119,7 @@ int format_host_labels_opentsdb_telnet(struct instance *instance, RRDHOST *host) if (unlikely(!sending_labels_configured(instance))) return 0; + rrdhost_check_rdlock(localhost); netdata_rwlock_rdlock(&host->labels_rwlock); for (struct label *label = host->labels; label; label = label->next) { if (!should_send_label(instance, label)) @@ -261,6 +262,7 @@ int format_host_labels_opentsdb_http(struct instance *instance, RRDHOST *host) if (unlikely(!sending_labels_configured(instance))) return 0; + rrdhost_check_rdlock(host); netdata_rwlock_rdlock(&host->labels_rwlock); for (struct label *label = host->labels; label; label = label->next) { if (!should_send_label(instance, label)) |