diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2020-11-26 13:00:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 13:00:32 +0200 |
commit | f8f4aed80d34967ba61de14463e9520829edcdc2 (patch) | |
tree | 071cbf803b0d8d989c601a1d399cbf297257826d /web | |
parent | e2bdec66c072d57436bbb3f089e69b25b7c41cd0 (diff) |
Fixed the data endpoint so that the context param is correctly applied to children (#10290)
Diffstat (limited to 'web')
-rw-r--r-- | web/api/web_api_v1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 8e8f631377..702778547c 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -499,12 +499,12 @@ inline int web_client_api_request_v1_data(RRDHOST *host, struct web_client *w, c if (context && !chart) { RRDSET *st1; uint32_t context_hash = simple_hash(context); - rrdhost_rdlock(localhost); - rrdset_foreach_read(st1, localhost) { + rrdhost_rdlock(host); + rrdset_foreach_read(st1, host) { if (st1->hash_context == context_hash && !strcmp(st1->context, context)) build_context_param_list(&context_param_list, st1); } - rrdhost_unlock(localhost); + rrdhost_unlock(host); if (likely(context_param_list && context_param_list->rd)) // Just set the first one st = context_param_list->rd->rrdset; } |