dovecot-2.2: dsync: Previous have_save_guids change somewhat bro...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 20 18:26:27 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/e0156c479a12
changeset: 16381:e0156c479a12
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 20 18:26:16 2013 +0300
description:
dsync: Previous have_save_guids change somewhat broke compatibility with earlier dsync versions.

diffstat:

 src/doveadm/dsync/dsync-ibc-stream.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 9878986a028d -r e0156c479a12 src/doveadm/dsync/dsync-ibc-stream.c
--- a/src/doveadm/dsync/dsync-ibc-stream.c	Mon May 20 17:30:23 2013 +0300
+++ b/src/doveadm/dsync/dsync-ibc-stream.c	Mon May 20 18:26:16 2013 +0300
@@ -28,10 +28,11 @@
 #define DSYNC_IBC_STREAM_OUTBUF_THROTTLE_SIZE (1024*128)
 
 #define DSYNC_PROTOCOL_VERSION_MAJOR 3
-#define DSYNC_PROTOCOL_VERSION_MINOR 1
+#define DSYNC_PROTOCOL_VERSION_MINOR 2
 #define DSYNC_HANDSHAKE_VERSION "VERSION\tdsync\t3\t1\n"
 
 #define DSYNC_PROTOCOL_MINOR_HAVE_ATTRIBUTES 1
+#define DSYNC_PROTOCOL_MINOR_HAVE_SAVE_GUID 2
 
 enum item_type {
 	ITEM_NONE,
@@ -1227,7 +1228,8 @@
 		box->mailbox_lost = TRUE;
 	if (dsync_deserializer_decode_try(decoder, "have_guids", &value))
 		box->have_guids = TRUE;
-	if (dsync_deserializer_decode_try(decoder, "have_save_guids", &value))
+	if (dsync_deserializer_decode_try(decoder, "have_save_guids", &value) ||
+	    (box->have_guids && ibc->minor_version < DSYNC_PROTOCOL_MINOR_HAVE_SAVE_GUID))
 		box->have_save_guids = TRUE;
 	value = dsync_deserializer_decode_get(decoder, "uid_validity");
 	if (str_to_uint32(value, &box->uid_validity) < 0) {


More information about the dovecot-cvs mailing list