Skip to content

Commit 24f8677

Browse files
committed
config_format: yaml: fix processors recognition
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 3cedd69 commit 24f8677

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/config_format/flb_cf_yaml.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,29 @@ static int consume_event(struct flb_cf *conf, struct local_ctx *ctx,
20312031
break;
20322032
case YAML_MAPPING_START_EVENT:
20332033

2034+
if (strcmp(state->key, "processors") == 0) {
2035+
struct flb_cf_group *group;
2036+
2037+
group = flb_cf_group_create(conf, state->cf_section,
2038+
state->key,
2039+
strlen(state->key));
2040+
2041+
if (group == NULL) {
2042+
flb_error("unable to create processors group");
2043+
return YAML_FAILURE;
2044+
}
2045+
2046+
state->cf_group = group;
2047+
state = state_push(ctx, STATE_INPUT_PROCESSORS);
2048+
2049+
if (state == NULL) {
2050+
flb_error("unable to allocate state");
2051+
return YAML_FAILURE;
2052+
}
2053+
2054+
break;
2055+
}
2056+
20342057
if (state->section == SECTION_PROCESSOR) {
20352058
/* when in a processor section, we allow plugins to have nested
20362059
* properties which are returned as a cfl_variant */

0 commit comments

Comments
 (0)