dovecot-2.2: dsync: Fix to 128bit GUID syncing

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 20 22:20:34 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/df2b27885c9d
changeset: 16995:df2b27885c9d
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 20 22:20:06 2013 +0200
description:
dsync: Fix to 128bit GUID syncing

diffstat:

 src/doveadm/dsync/dsync-mailbox-import.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r fbf77af0233c -r df2b27885c9d src/doveadm/dsync/dsync-mailbox-import.c
--- a/src/doveadm/dsync/dsync-mailbox-import.c	Wed Nov 20 21:25:19 2013 +0200
+++ b/src/doveadm/dsync/dsync-mailbox-import.c	Wed Nov 20 22:20:06 2013 +0200
@@ -472,16 +472,17 @@
 {
 	guid_128_t guid_128, change_guid_128;
 
-	if (change->type != DSYNC_MAIL_CHANGE_TYPE_EXPUNGE &&
-	    !importer->mails_use_guid128) {
+	if (change->type == DSYNC_MAIL_CHANGE_TYPE_EXPUNGE) {
+		if (guid_128_from_string(change->guid, change_guid_128) < 0)
+			i_unreached();
+	} else if (importer->mails_use_guid128) {
+		mail_generate_guid_128_hash(change->guid, change_guid_128);
+	} else {
 		if (cmp_guid_r != NULL)
 			*cmp_guid_r = change->guid;
 		return strcmp(change->guid, guid) == 0;
 	}
 
-	if (guid_128_from_string(change->guid, change_guid_128) < 0)
-		i_unreached();
-
 	mail_generate_guid_128_hash(guid, guid_128);
 	if (memcmp(change_guid_128, guid_128, GUID_128_SIZE) != 0) {
 		if (cmp_guid_r != NULL) {


More information about the dovecot-cvs mailing list