From: Alan T. DeKok Date: Fri, 1 Oct 2021 15:41:53 +0000 (-0400) Subject: set parsed before calling the callback function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a045c7c6befe6f1bfa8da7f41ad652b2699b5b8;p=thirdparty%2Ffreeradius-server.git set parsed before calling the callback function --- diff --git a/src/lib/server/cf_parse.c b/src/lib/server/cf_parse.c index 69dd578626d..609585e3c38 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;