summaryrefslogtreecommitdiffstats
path: root/src/database/contexts/query_target.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/contexts/query_target.c')
-rw-r--r--src/database/contexts/query_target.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/database/contexts/query_target.c b/src/database/contexts/query_target.c
index 29a9c3e59..b25b8e427 100644
--- a/src/database/contexts/query_target.c
+++ b/src/database/contexts/query_target.c
@@ -897,9 +897,9 @@ static ssize_t query_node_add(void *data, RRDHOST *host, bool queryable_host) {
QUERY_TARGET *qt = qtl->qt;
QUERY_NODE *qn = query_node_allocate(qt, host);
- if(host->node_id) {
+ if(!UUIDiszero(host->node_id)) {
if(!qtl->host_node_id_str[0])
- uuid_unparse_lower(*host->node_id, qn->node_id);
+ uuid_unparse_lower(host->node_id.uuid, qn->node_id);
else
memcpy(qn->node_id, qtl->host_node_id_str, sizeof(qn->node_id));
}
@@ -958,7 +958,7 @@ static ssize_t query_node_add(void *data, RRDHOST *host, bool queryable_host) {
void query_target_generate_name(QUERY_TARGET *qt) {
char options_buffer[100 + 1];
- web_client_api_request_v1_data_options_to_string(options_buffer, 100, qt->request.options);
+ web_client_api_request_data_vX_options_to_string(options_buffer, 100, qt->request.options);
char resampling_buffer[20 + 1] = "";
if(qt->request.resampling_time > 1)
@@ -1035,8 +1035,8 @@ void query_target_generate_name(QUERY_TARGET *qt) {
}
QUERY_TARGET *query_target_create(QUERY_TARGET_REQUEST *qtr) {
- if(!service_running(ABILITY_DATA_QUERIES))
- return NULL;
+ //if(!service_running(ABILITY_DATA_QUERIES))
+ // return NULL;
QUERY_TARGET *qt = query_target_get();
@@ -1120,8 +1120,8 @@ QUERY_TARGET *query_target_create(QUERY_TARGET_REQUEST *qtr) {
}
if(host) {
- if(host->node_id)
- uuid_unparse_lower(*host->node_id, qtl.host_node_id_str);
+ if(!UUIDiszero(host->node_id))
+ uuid_unparse_lower(host->node_id.uuid, qtl.host_node_id_str);
else
qtl.host_node_id_str[0] = '\0';