From: Timo Sirainen Date: Mon, 18 Sep 2023 10:09:01 +0000 (+0300) Subject: config: Fix writing delayed errors for filters X-Git-Tag: 2.4.0~1646 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6eb68486fe0aeb83ff61d495f0e47273dd80aaa;p=thirdparty%2Fdovecot%2Fcore.git config: Fix writing delayed errors for filters The index number was moved elsewhere, it shouldn't be here. --- diff --git a/src/config/config-dump-full.c b/src/config/config-dump-full.c index 6eadf0360a..4fc17271b0 100644 --- a/src/config/config-dump-full.c +++ b/src/config/config-dump-full.c @@ -285,18 +285,11 @@ config_dump_full_handle_error(struct dump_context *dump_ctx, return -1; } - string_t *str = t_str_new(256); - if (dump_ctx->filter != NULL) { - uint32_t filter_idx_be32 = cpu32_to_be(dump_ctx->filter_idx); - o_stream_nsend(output, &filter_idx_be32, - sizeof(filter_idx_be32)); - } - str_append(str, error); - str_append_c(str, '\0'); - - uint64_t blob_size = cpu64_to_be(str_len(str)); + size_t error_len = strlen(error) + 1; + uint64_t blob_size = cpu64_to_be(error_len); o_stream_nsend(output, &blob_size, sizeof(blob_size)); - o_stream_nsend(output, str_data(str), str_len(str)); + o_stream_nsend(output, error, error_len); + dump_ctx->filter_written = TRUE; return 0; }