summaryrefslogtreecommitdiffstats
path: root/src/daemon/config/dyncfg-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/config/dyncfg-tree.c')
-rw-r--r--src/daemon/config/dyncfg-tree.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/daemon/config/dyncfg-tree.c b/src/daemon/config/dyncfg-tree.c
index 77d031fa0..4bad2f30f 100644
--- a/src/daemon/config/dyncfg-tree.c
+++ b/src/daemon/config/dyncfg-tree.c
@@ -71,12 +71,10 @@ static void dyncfg_tree_for_host(RRDHOST *host, BUFFER *wb, const char *path, co
if(id && *id)
template = string_strdupz(id);
- ND_UUID host_uuid = uuid2UUID(host->host_uuid);
-
size_t path_len = strlen(path);
DYNCFG *df;
dfe_start_read(dyncfg_globals.nodes, df) {
- if(!UUIDeq(df->host_uuid, host_uuid))
+ if(!UUIDeq(df->host_uuid, host->host_id))
continue;
if(strncmp(string2str(df->path), path, path_len) != 0)
@@ -162,7 +160,7 @@ static int dyncfg_config_execute_cb(struct rrd_function_execute *rfe, void *data
memcpy(buf, rfe->function, sizeof(buf));
char *words[MAX_FUNCTION_PARAMETERS]; // an array of pointers for the words in this line
- size_t num_words = quoted_strings_splitter_pluginsd(buf, words, MAX_FUNCTION_PARAMETERS);
+ size_t num_words = quoted_strings_splitter_whitespace(buf, words, MAX_FUNCTION_PARAMETERS);
const char *config = get_word(words, num_words, 0);
const char *action = get_word(words, num_words, 1);
@@ -266,7 +264,7 @@ static int dyncfg_config_execute_cb(struct rrd_function_execute *rfe, void *data
rrd_call_function_error(
rfe->result.wb,
- "unknown config id given", code);
+ "Unknown config id given.", code);
}
cleanup:
@@ -286,7 +284,7 @@ void dyncfg_host_init(RRDHOST *host) {
// This function needs to be async, although it is internal.
// The reason is that it can call by itself another function that may or may not be internal (sync).
- rrd_function_add(host, NULL, PLUGINSD_FUNCTION_CONFIG, 120,
- 1000, "Dynamic configuration", "config", HTTP_ACCESS_ANONYMOUS_DATA,
+ rrd_function_add(host, NULL, PLUGINSD_FUNCTION_CONFIG, 120, 1000, DYNCFG_FUNCTIONS_VERSION,
+ "Dynamic configuration", "config", HTTP_ACCESS_ANONYMOUS_DATA,
false, dyncfg_config_execute_cb, host);
}