summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/config/dyncfg.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/libnetdata/config/dyncfg.c
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libnetdata/config/dyncfg.c')
-rw-r--r--src/libnetdata/config/dyncfg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libnetdata/config/dyncfg.c b/src/libnetdata/config/dyncfg.c
index 244864c65..81b050f89 100644
--- a/src/libnetdata/config/dyncfg.c
+++ b/src/libnetdata/config/dyncfg.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
-#include "../../libnetdata/libnetdata.h"
+#include "../libnetdata.h"
// ----------------------------------------------------------------------------
@@ -211,7 +211,7 @@ bool dyncfg_is_valid_id(const char *id) {
return true;
}
-static inline bool is_forbidden_char(char c) {
+static inline bool is_forbidden_filename_char(char c) {
if(isspace((uint8_t)c) || !isprint((uint8_t)c))
return true;
@@ -239,7 +239,7 @@ char *dyncfg_escape_id_for_filename(const char *id) {
char *dest = escaped;
while (*src) {
- if (is_forbidden_char(*src)) {
+ if (is_forbidden_filename_char(*src)) {
sprintf(dest, "%%%02X", (unsigned char)*src);
dest += 3;
} else {
@@ -277,7 +277,7 @@ int dyncfg_node_find_and_call(DICTIONARY *dyncfg_nodes, const char *transaction,
memcpy(buf, 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 *id = get_word(words, num_words, 1);
const char *action = get_word(words, num_words, 2);