dovecot-2.0: dsync: Fixed handling expunges of last message when...

dovecot at dovecot.org dovecot at dovecot.org
Sat Mar 26 00:42:52 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/e0f13d7510ef
changeset: 12705:e0f13d7510ef
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Mar 26 00:40:58 2011 +0200
description:
dsync: Fixed handling expunges of last message when it didn't have a known GUID.

diffstat:

 src/dsync/dsync-worker-local.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r e5547c86528f -r e0f13d7510ef src/dsync/dsync-worker-local.c
--- a/src/dsync/dsync-worker-local.c	Sat Mar 26 00:39:40 2011 +0200
+++ b/src/dsync/dsync-worker-local.c	Sat Mar 26 00:40:58 2011 +0200
@@ -925,6 +925,7 @@
 {
 	struct mailbox *box = iter->mail->box;
 	struct mailbox_status status;
+	const uint8_t *guid_128;
 	const struct mailbox_expunge_rec *expunges;
 	unsigned int count;
 
@@ -935,9 +936,11 @@
 
 		memset(msg_r, 0, sizeof(*msg_r));
 		str_truncate(iter->tmp_guid_str, 0);
-		binary_to_hex_append(iter->tmp_guid_str,
-				     expunges[iter->expunge_idx].guid_128,
-				     MAIL_GUID_128_SIZE);
+		guid_128 = expunges[iter->expunge_idx].guid_128;
+		if (!mail_guid_128_is_empty(guid_128)) {
+			binary_to_hex_append(iter->tmp_guid_str, guid_128,
+					     MAIL_GUID_128_SIZE);
+		}
 		msg_r->guid = str_c(iter->tmp_guid_str);
 		msg_r->uid = expunges[iter->expunge_idx].uid;
 		msg_r->flags = DSYNC_MAIL_FLAG_EXPUNGED;


More information about the dovecot-cvs mailing list