summaryrefslogtreecommitdiffstats
path: root/parser
diff options
context:
space:
mode:
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 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);