dovecot-2.0: mbox: Looking up GUID/MD5(header) more than once wa...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 28 21:11:33 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/36025cbfec3b
changeset: 12754:36025cbfec3b
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 28 21:10:57 2011 +0300
description:
mbox: Looking up GUID/MD5(header) more than once was broken.

diffstat:

 src/lib-storage/index/mbox/mbox-mail.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r c2f81056d38f -r 36025cbfec3b src/lib-storage/index/mbox/mbox-mail.c
--- a/src/lib-storage/index/mbox/mbox-mail.c	Thu Apr 28 17:20:22 2011 +0300
+++ b/src/lib-storage/index/mbox/mbox-mail.c	Thu Apr 28 21:10:57 2011 +0300
@@ -154,8 +154,10 @@
 	struct mbox_mailbox *mbox = (struct mbox_mailbox *)mail->mail.mail.box;
 	const void *ext_data;
 
-	if (mail->data.guid != NULL)
-		return mail->data.guid;
+	if (mail->data.guid != NULL) {
+		*value_r = mail->data.guid;
+		return TRUE;
+	}
 
 	mail_index_lookup_ext(mail->mail.mail.transaction->view,
 			      mail->mail.mail.seq, mbox->md5hdr_ext_idx,


More information about the dovecot-cvs mailing list