summaryrefslogtreecommitdiffstats
path: root/src/web/api/queries/weights.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/api/queries/weights.c (renamed from web/api/queries/weights.c)8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/api/queries/weights.c b/src/web/api/queries/weights.c
index 68af2250f..44928fea8 100644
--- a/web/api/queries/weights.c
+++ b/src/web/api/queries/weights.c
@@ -113,7 +113,7 @@ static void register_result(DICTIONARY *results, RRDHOST *host, RRDCONTEXT_ACQUI
// we can use the pointer address or RMA as a unique key for each metric
char buf[20 + 1];
ssize_t len = snprintfz(buf, sizeof(buf) - 1, "%p", rma);
- dictionary_set_advanced(results, buf, len + 1, &t, sizeof(struct register_result), NULL);
+ dictionary_set_advanced(results, buf, len, &t, sizeof(struct register_result), NULL);
}
// ----------------------------------------------------------------------------
@@ -158,7 +158,7 @@ static void results_header_to_json(DICTIONARY *results __maybe_unused, BUFFER *w
buffer_json_member_add_string(wb, "group", time_grouping_tostring(group));
buffer_json_member_add_string(wb, "method", weights_method_to_string(method));
- web_client_api_request_v1_data_options_to_buffer_json_array(wb, "options", options);
+ rrdr_options_to_buffer_json_array(wb, "options", options);
}
static size_t registered_results_to_json_charts(DICTIONARY *results, BUFFER *wb,
@@ -372,7 +372,7 @@ static void results_header_to_json_v2(DICTIONARY *results __maybe_unused, BUFFER
buffer_json_member_add_object(wb, "request");
buffer_json_member_add_string(wb, "method", weights_method_to_string(method));
- web_client_api_request_v1_data_options_to_buffer_json_array(wb, "options", options);
+ rrdr_options_to_buffer_json_array(wb, "options", options);
buffer_json_member_add_object(wb, "scope");
buffer_json_member_add_string(wb, "scope_nodes", qwd->qwr->scope_nodes ? qwd->qwr->scope_nodes : "*");
@@ -1717,6 +1717,8 @@ static ssize_t weights_for_rrdmetric(void *data, RRDHOST *host, RRDCONTEXT_ACQUI
return -1;
}
+ query_progress_done_step(qwr->transaction, 1);
+
return 1;
}