dovecot-2.2: dsync: GUIDs weren't set properly to expunge record...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jan 21 17:44:27 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/9d461d3b2fe7
changeset: 15659:9d461d3b2fe7
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jan 21 17:44:16 2013 +0200
description:
dsync: GUIDs weren't set properly to expunge records, causing non-optimal behavior.

diffstat:

 src/doveadm/dsync/dsync-transaction-log-scan.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 3a395a61f109 -r 9d461d3b2fe7 src/doveadm/dsync/dsync-transaction-log-scan.c
--- a/src/doveadm/dsync/dsync-transaction-log-scan.c	Mon Jan 21 16:57:49 2013 +0200
+++ b/src/doveadm/dsync/dsync-transaction-log-scan.c	Mon Jan 21 17:44:16 2013 +0200
@@ -118,7 +118,7 @@
 
 	end = CONST_PTR_OFFSET(data, hdr->size);
 	for (; rec != end; rec++) {
-		if (!external && !mail_index_lookup_seq(view, rec->uid, &seq)) {
+		if (!external && mail_index_lookup_seq(view, rec->uid, &seq)) {
 			/* expunge request that hasn't been actually done yet.
 			   we check non-external ones because they might have
 			   the GUID while external ones don't. */
@@ -126,7 +126,8 @@
 		}
 		if (export_change_get(ctx, rec->uid,
 				      DSYNC_MAIL_CHANGE_TYPE_EXPUNGE,
-				      &change)) T_BEGIN {
+				      &change) &&
+		    !guid_128_is_empty(rec->guid_128)) T_BEGIN {
 			change->guid = p_strdup(ctx->pool,
 				guid_128_to_string(rec->guid_128));
 		} T_END;
@@ -150,7 +151,7 @@
 				       DSYNC_MAIL_CHANGE_TYPE_EXPUNGE,
 				       &change))
 			i_unreached();
-		T_BEGIN {
+		if (!guid_128_is_empty(rec->guid_128)) T_BEGIN {
 			change->guid = p_strdup(ctx->pool,
 						guid_128_to_string(rec->guid_128));
 		} T_END;


More information about the dovecot-cvs mailing list