Skip to content

Commit f5b2fdd

Browse files
feat: manual review and update of missing changes
Signed-off-by: Patrick Stephens <pat@telemetryforge.io>
1 parent 4f76091 commit f5b2fdd

1 file changed

Lines changed: 4 additions & 26 deletions

File tree

source/src/config_format/flb_cf_yaml.c

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,8 @@ static int consume_event(struct flb_cf *conf, struct local_ctx *ctx,
22432243
state = state_push_variant(ctx, state, 0);
22442244
}
22452245
else if (strcmp(state->key, "routes") == 0 ||
2246-
strcmp(state->key, "processors") == 0) {
2246+
strcmp(state->key, "processors") == 0 ||
2247+
strcmp(state->key, "filters") == 0) {
22472248
state = state_push_variant(ctx, state, 0);
22482249
}
22492250
else {
@@ -2256,30 +2257,6 @@ static int consume_event(struct flb_cf *conf, struct local_ctx *ctx,
22562257
}
22572258
break;
22582259
case YAML_MAPPING_START_EVENT:
2259-
2260-
if (strcmp(state->key, "processors") == 0) {
2261-
struct flb_cf_group *group;
2262-
2263-
group = flb_cf_group_create(conf, state->cf_section,
2264-
state->key,
2265-
strlen(state->key));
2266-
2267-
if (group == NULL) {
2268-
flb_error("unable to create processors group");
2269-
return YAML_FAILURE;
2270-
}
2271-
2272-
state->cf_group = group;
2273-
state = state_push(ctx, STATE_INPUT_PROCESSORS);
2274-
2275-
if (state == NULL) {
2276-
flb_error("unable to allocate state");
2277-
return YAML_FAILURE;
2278-
}
2279-
2280-
break;
2281-
}
2282-
22832260
if (state->section == SECTION_PROCESSOR || state->section == SECTION_FILTER) {
22842261
/* when in a processor or filter section, allow plugins to have nested
22852262
* properties which are returned as a cfl_variant */
@@ -2293,7 +2270,8 @@ static int consume_event(struct flb_cf *conf, struct local_ctx *ctx,
22932270
}
22942271

22952272
if (strcmp(state->key, "routes") == 0 ||
2296-
strcmp(state->key, "processors") == 0) {
2273+
strcmp(state->key, "processors") == 0 ||
2274+
strcmp(state->key, "filters") == 0) {
22972275
state = state_push_variant(ctx, state, 1);
22982276

22992277
if (state == NULL) {

0 commit comments

Comments
 (0)