summaryrefslogtreecommitdiffstats
path: root/parser
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
commit3c315f0fff93aa072472abc10815963ac0035268 (patch)
treea95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /parser
parentAdding upstream version 1.35.1. (diff)
downloadnetdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz
netdata-3c315f0fff93aa072472abc10815963ac0035268.zip
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'parser')
-rw-r--r--parser/parser.c4
-rw-r--r--parser/parser.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/parser/parser.c b/parser/parser.c
index 01256da4..c37d1e2c 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 65a4e1ab..1887318f 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);