summaryrefslogtreecommitdiffstats
path: root/src/web/api
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 08:15:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 08:15:20 +0000
commit87d772a7d708fec12f48cd8adc0dedff6e1025da (patch)
tree1fee344c64cc3f43074a01981e21126c8482a522 /src/web/api
parentAdding upstream version 1.46.3. (diff)
downloadnetdata-87d772a7d708fec12f48cd8adc0dedff6e1025da.tar.xz
netdata-87d772a7d708fec12f48cd8adc0dedff6e1025da.zip
Adding upstream version 1.47.0.upstream/1.47.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/web/api')
-rw-r--r--src/web/api/queries/query.c2
-rw-r--r--src/web/api/web_api_v1.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/web/api/queries/query.c b/src/web/api/queries/query.c
index c97b546b1..6854300f3 100644
--- a/src/web/api/queries/query.c
+++ b/src/web/api/queries/query.c
@@ -691,7 +691,7 @@ static void rrdr_set_grouping_function(RRDR *r, RRDR_TIME_GROUPING group_method)
}
}
if(!found) {
- errno = 0;
+ errno_clear();
internal_error(true, "QUERY: grouping method %u not found. Using 'average'", (unsigned int)group_method);
r->time_grouping.create = tg_average_create;
r->time_grouping.reset = tg_average_reset;
diff --git a/src/web/api/web_api_v1.c b/src/web/api/web_api_v1.c
index 1884f1fe0..bfaa4f6f7 100644
--- a/src/web/api/web_api_v1.c
+++ b/src/web/api/web_api_v1.c
@@ -1422,10 +1422,13 @@ static int web_client_api_request_v1_aclk_state(RRDHOST *host, struct web_client
BUFFER *wb = w->response.data;
buffer_flush(wb);
-
+#ifdef ENABLE_ACLK
char *str = aclk_state_json();
buffer_strcat(wb, str);
freez(str);
+#else
+ buffer_strcat(wb, "{\"aclk-available\":false}");
+#endif
wb->content_type = CT_APPLICATION_JSON;
buffer_no_cacheable(wb);