From: Timo Sirainen Date: Sat, 3 Feb 2024 21:58:26 +0000 (+0200) Subject: config: Move delay_errors check into config_apply_error() X-Git-Tag: 2.4.1~1077 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58f0c522348a250e185ba97a7bb49a3d39dfe1e8;p=thirdparty%2Fdovecot%2Fcore.git config: Move delay_errors check into config_apply_error() This simplifies the next commit. --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index 0b3b4463db..6b3ceacea8 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -309,6 +309,9 @@ config_apply_error(struct config_parser_context *ctx, const char *key) { struct config_parser_key *config_key; + if (!ctx->delay_errors) + return -1; + /* Couldn't get value for the setting, but we're delaying error handling. Mark all settings parsers containing this key as failed. See config-parser.h for details. */ @@ -1934,8 +1937,7 @@ void config_parser_apply_line(struct config_parser_context *ctx, case CONFIG_LINE_TYPE_KEYFILE: case CONFIG_LINE_TYPE_KEYVARIABLE: if (config_write_value(ctx, line) < 0) { - if (!ctx->delay_errors || - config_apply_error(ctx, line->key) < 0) + if (config_apply_error(ctx, line->key) < 0) break; } else { /* Either a global key or list/key */