From c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:22 +0100 Subject: Adding upstream version 1.44.3. Signed-off-by: Daniel Baumann --- web/api/web_api_v1.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'web/api/web_api_v1.c') diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c index 648864017..e08f8aa2f 100644 --- a/web/api/web_api_v1.c +++ b/web/api/web_api_v1.c @@ -444,7 +444,7 @@ inline int web_client_api_request_v1_alarm_count(RRDHOST *host, struct web_clien } inline int web_client_api_request_v1_alarm_log(RRDHOST *host, struct web_client *w, char *url) { - uint32_t after = 0; + time_t after = 0; char *chart = NULL; while(url) { @@ -455,7 +455,7 @@ inline int web_client_api_request_v1_alarm_log(RRDHOST *host, struct web_client if(!name || !*name) continue; if(!value || !*value) continue; - if (!strcmp(name, "after")) after = (uint32_t)strtoul(value, NULL, 0); + if (!strcmp(name, "after")) after = (time_t) strtoul(value, NULL, 0); else if (!strcmp(name, "chart")) chart = value; } @@ -644,7 +644,7 @@ inline int web_client_api_request_v1_charts(RRDHOST *host, struct web_client *w, buffer_flush(w->response.data); w->response.data->content_type = CT_APPLICATION_JSON; - charts2json(host, w->response.data, 0); + charts2json(host, w->response.data); return HTTP_RESP_OK; } @@ -1272,12 +1272,8 @@ inline int web_client_api_request_v1_info_fill_buffer(RRDHOST *host, BUFFER *wb) buffer_json_member_add_boolean(wb, "web-enabled", web_server_mode != WEB_SERVER_MODE_NONE); buffer_json_member_add_boolean(wb, "stream-enabled", default_rrdpush_enabled); -#ifdef ENABLE_RRDPUSH_COMPRESSION buffer_json_member_add_boolean(wb, "stream-compression", - host->sender && stream_has_capability(host->sender, STREAM_CAP_COMPRESSION)); -#else // ! ENABLE_RRDPUSH_COMPRESSION - buffer_json_member_add_boolean(wb, "stream-compression", false); -#endif // ENABLE_RRDPUSH_COMPRESSION + host->sender && host->sender->compressor.initialized); #ifdef ENABLE_HTTPS buffer_json_member_add_boolean(wb, "https-enabled", true); @@ -1414,7 +1410,10 @@ int web_client_api_request_v1_function(RRDHOST *host, struct web_client *w, char wb->content_type = CT_APPLICATION_JSON; buffer_no_cacheable(wb); - return rrd_function_run(host, wb, timeout, function, true, NULL, + char transaction[UUID_COMPACT_STR_LEN]; + uuid_unparse_lower_compact(w->transaction, transaction); + + return rrd_function_run(host, wb, timeout, function, true, transaction, NULL, NULL, web_client_interrupt_callback, w, NULL); } -- cgit v1.2.3