diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:17 +0000 |
commit | 7877a98bd9c00db5e81dd2f8c734cba2bab20be7 (patch) | |
tree | d18b767250f7c7ced9b8abe2ece784ac1fe24d3e /parser | |
parent | Releasing debian version 1.35.1-2. (diff) | |
download | netdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.tar.xz netdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.zip |
Merging upstream version 1.36.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'parser')
-rw-r--r-- | parser/parser.c | 4 | ||||
-rw-r--r-- | parser/parser.h | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/parser/parser.c b/parser/parser.c index 01256da4a..c37d1e2c4 100644 --- a/parser/parser.c +++ b/parser/parser.c @@ -9,7 +9,7 @@ static inline int find_keyword(char *str, char *keyword, int max_size, int (*cus while (unlikely(custom_isspace(*s))) s++; keyword_start = s; - while (likely(*s && !custom_isspace(*s)) && max_size > 0) { + while (likely(*s && !custom_isspace(*s)) && max_size > 1) { *keyword++ = *s++; max_size--; } @@ -238,7 +238,7 @@ inline int parser_action(PARSER *parser, char *input) { PARSER_RC rc = PARSER_RC_OK; char *words[PLUGINSD_MAX_WORDS] = { NULL }; - char command[PLUGINSD_LINE_MAX]; + char command[PLUGINSD_LINE_MAX + 1]; keyword_function action_function; keyword_function *action_function_list = NULL; diff --git a/parser/parser.h b/parser/parser.h index 65a4e1ab3..1887318fc 100644 --- a/parser/parser.h +++ b/parser/parser.h @@ -28,11 +28,11 @@ typedef struct pluginsd_action { PARSER_RC (*flush_action)(void *user, RRDSET *st); PARSER_RC (*disable_action)(void *user); - PARSER_RC (*variable_action)(void *user, RRDHOST *host, RRDSET *st, char *name, int global, calculated_number value); - PARSER_RC (*label_action)(void *user, char *key, char *value, LABEL_SOURCE source); - PARSER_RC (*overwrite_action)(void *user, RRDHOST *host, struct label *new_labels); - PARSER_RC (*clabel_action)(void *user, char *key, char *value, LABEL_SOURCE source); - PARSER_RC (*clabel_commit_action)(void *user, RRDHOST *host, struct label *new_labels); + PARSER_RC (*variable_action)(void *user, RRDHOST *host, RRDSET *st, char *name, int global, NETDATA_DOUBLE value); + PARSER_RC (*label_action)(void *user, char *key, char *value, RRDLABEL_SRC source); + PARSER_RC (*overwrite_action)(void *user, RRDHOST *host, DICTIONARY *new_labels); + PARSER_RC (*clabel_action)(void *user, char *key, char *value, RRDLABEL_SRC source); + PARSER_RC (*clabel_commit_action)(void *user, RRDHOST *host, DICTIONARY *new_labels); PARSER_RC (*guid_action)(void *user, uuid_t *uuid); PARSER_RC (*context_action)(void *user, uuid_t *uuid); |