From 6a045c7c6befe6f1bfa8da7f41ad652b2699b5b8 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Fri, 1 Oct 2021 11:41:53 -0400 Subject: [PATCH] set parsed before calling the callback function --- src/lib/server/cf_parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/server/cf_parse.c b/src/lib/server/cf_parse.c index 69dd578626..609585e3c3 100644 --- a/src/lib/server/cf_parse.c +++ b/src/lib/server/cf_parse.c @@ -842,6 +842,8 @@ static int CC_HINT(nonnull(4,5)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *o if (deprecated) goto deprecated; + cp->parsed = true; + if (rule->func) { cf_log_debug(cs, "%.*s%s = %s", PAIR_SPACE(cs), parse_spaces, cp->attr, cp->value); cp->printed = true; @@ -850,7 +852,6 @@ static int CC_HINT(nonnull(4,5)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *o ret = func(ctx, out, base, cf_pair_to_item(cp), rule); if (ret < 0) return -1; - cp->parsed = true; } return 0; -- 2.47.2