Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2978:982e7432276f HEAD
If mbox isn't synced, don't try to set message's md5sum because it just
crashes..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 15 Dec 2004 23:31:53 +0200 |
parents | 4a6788997812 |
children | 10d1fd8d0865 |
files | src/lib-storage/index/mbox/mbox-save.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-save.c Wed Dec 15 22:12:31 2004 +0200 +++ b/src/lib-storage/index/mbox/mbox-save.c Wed Dec 15 23:31:53 2004 +0200 @@ -282,7 +282,7 @@ { struct mbox_save_context *ctx = context; - if (!*matched && ctx->ibox->mbox_save_md5 && hdr != NULL) + if (!*matched && ctx->mbox_md5_ctx && hdr != NULL) mbox_md5_continue(ctx->mbox_md5_ctx, hdr); if ((hdr == NULL && ctx->eoh_input_offset == (uoff_t)-1) || @@ -376,7 +376,7 @@ ctx->body_output = getenv("MAIL_SAVE_CRLF") != NULL ? o_stream_create_crlf(default_pool, ctx->output) : o_stream_create_lf(default_pool, ctx->output); - if (ctx->ibox->mbox_save_md5) + if (ctx->ibox->mbox_save_md5 && ctx->synced) ctx->mbox_md5_ctx = mbox_md5_init(); } @@ -436,7 +436,7 @@ } } - if (ctx->ibox->mbox_save_md5) { + if (ctx->mbox_md5_ctx) { unsigned char hdr_md5_sum[16]; mbox_md5_finish(ctx->mbox_md5_ctx, hdr_md5_sum);