]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-storage: Make sure ENVELOPE parsing isn't done twice concurrently
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 9 Sep 2019 16:16:19 +0000 (19:16 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 31 Jan 2020 11:58:41 +0000 (11:58 +0000)
commitd422cad5d5019db62cad5293e80b67e403ed05e8
tree3c21e0103f9daa5a76638dc88595816948ca6de3
parent782a16de6cfac2f9a242a00b74ea2b8073fda14f
lib-storage: Make sure ENVELOPE parsing isn't done twice concurrently

If save_envelope=TRUE and ENVELOPE headers aren't already in cache,
header_cache_callback() starts parsing the ENVELOPE. But
imap_envelope_parse_callback() does it as well, so the envelope parsing is
done concurrently by the two callbacks.

Also once the ENVELOPE parsing is done once, make sure it's not done again
if the header is parsed again.

This didn't cause any problems so far, but it fixes the following commit to
work correctly.
src/lib-storage/index/index-mail-headers.c