[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.68, 1.69

cras at dovecot.org cras at dovecot.org
Wed Dec 15 23:31:56 EET 2004


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv27009/lib-storage/index/mbox

Modified Files:
	mbox-save.c 
Log Message:
If mbox isn't synced, don't try to set message's md5sum because it just
crashes..



Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- mbox-save.c	15 Dec 2004 18:48:06 -0000	1.68
+++ mbox-save.c	15 Dec 2004 21:31:53 -0000	1.69
@@ -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);



More information about the dovecot-cvs mailing list