]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: index_mail_init_stream() - Add asserts to check state if stream has...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 3 Sep 2025 09:21:50 +0000 (12:21 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Oct 2025 11:28:44 +0000 (11:28 +0000)
src/lib-storage/index/index-mail.c

index dfb76e9a358c9e35f9618abf7f68a707e95d560d..f12c5a194ef801a61db3912bfb141b0625121089 100644 (file)
@@ -1368,6 +1368,9 @@ int index_mail_init_stream(struct index_mail *mail,
        int ret;
 
        i_assert(_mail->mail_stream_accessed);
+       i_assert(!data->stream_has_only_header || body_size == NULL);
+       i_assert(!data->stream_has_only_header ||
+                (data->access_part & (READ_BODY | PARSE_BODY)) == 0);
 
        if (!data->initialized_wrapper_stream &&
            _mail->transaction->stats_track) {