dovecot-2.1: lib-storage: Fixed reopening a mail stream.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 5 17:44:58 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/fab95106bcd6
changeset: 13608:fab95106bcd6
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 05 17:51:32 2011 +0300
description:
lib-storage: Fixed reopening a mail stream.
diffstat:
src/lib-storage/index/index-mail.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diffs (36 lines):
diff -r 186910f65582 -r fab95106bcd6 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c Wed Oct 05 17:51:01 2011 +0300
+++ b/src/lib-storage/index/index-mail.c Wed Oct 05 17:51:32 2011 +0300
@@ -1128,20 +1128,24 @@
void index_mail_close_streams(struct index_mail *mail)
{
+ struct index_mail_data *data = &mail->data;
struct message_part *parts;
- if (mail->data.parser_ctx != NULL) {
- if (message_parser_deinit(&mail->data.parser_ctx, &parts) < 0) {
+ if (data->parser_ctx != NULL) {
+ if (message_parser_deinit(&data->parser_ctx, &parts) < 0) {
mail_set_cache_corrupted(&mail->mail.mail,
MAIL_FETCH_MESSAGE_PARTS);
}
}
- if (mail->data.filter_stream != NULL)
- i_stream_unref(&mail->data.filter_stream);
- if (mail->data.stream != NULL) {
- mail->data.destroying_stream = TRUE;
- i_stream_unref(&mail->data.stream);
- i_assert(!mail->data.destroying_stream);
+ if (data->filter_stream != NULL)
+ i_stream_unref(&data->filter_stream);
+ if (data->stream != NULL) {
+ data->destroying_stream = TRUE;
+ i_stream_unref(&data->stream);
+ i_assert(!data->destroying_stream);
+
+ data->initialized_wrapper_stream = FALSE;
+ data->destroy_callback_set = FALSE;
}
}
More information about the dovecot-cvs
mailing list