dovecot-2.2: imap: if mailbox has non-permanent modseqs, never s...

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 19 21:26:01 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/f5e51a926542
changeset: 17070:f5e51a926542
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Dec 19 21:25:08 2013 +0200
description:
imap: if mailbox has non-permanent modseqs, never send HIGHESTMODSEQ/MODSEQs.

diffstat:

 src/imap/cmd-select.c  |  1 +
 src/imap/imap-client.h |  1 +
 src/imap/imap-sync.c   |  6 ++++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r c23063144736 -r f5e51a926542 src/imap/cmd-select.c
--- a/src/imap/cmd-select.c	Thu Dec 19 21:21:39 2013 +0200
+++ b/src/imap/cmd-select.c	Thu Dec 19 21:25:08 2013 +0200
@@ -346,6 +346,7 @@
 			 t_strdup_printf("* OK [UIDNEXT %u] Predicted next UID",
 					 status.uidnext));
 
+	client->nonpermanent_modseqs = status.nonpermanent_modseqs;
 	if (status.nonpermanent_modseqs) {
 		client_send_line(client,
 				 "* OK [NOMODSEQ] No permanent modsequences");
diff -r c23063144736 -r f5e51a926542 src/imap/imap-client.h
--- a/src/imap/imap-client.h	Thu Dec 19 21:21:39 2013 +0200
+++ b/src/imap/imap-client.h	Thu Dec 19 21:25:08 2013 +0200
@@ -165,6 +165,7 @@
 	unsigned int notify_count_changes:1;
 	unsigned int notify_flag_changes:1;
 	unsigned int imap_metadata_enabled:1;
+	unsigned int nonpermanent_modseqs:1;
 };
 
 struct imap_module_register {
diff -r c23063144736 -r f5e51a926542 src/imap/imap-sync.c
--- a/src/imap/imap-sync.c	Thu Dec 19 21:21:39 2013 +0200
+++ b/src/imap/imap-sync.c	Thu Dec 19 21:25:08 2013 +0200
@@ -374,7 +374,8 @@
 	ret = imap_sync_finish(ctx, TRUE);
 	imap_client_notify_finished(ctx->client);
 
-	if ((ctx->client->enabled_features & MAILBOX_FEATURE_QRESYNC) != 0)
+	if ((ctx->client->enabled_features & MAILBOX_FEATURE_QRESYNC) != 0 &&
+	    !ctx->client->nonpermanent_modseqs)
 		imap_sync_send_highestmodseq(ctx, sync_cmd);
 
 	if (array_is_created(&ctx->search_removes)) {
@@ -415,7 +416,8 @@
 	if (ctx->imap_flags & IMAP_SYNC_FLAG_SEND_UID)
 		str_printfa(str, "UID %u ", ctx->mail->uid);
 	if ((mailbox_get_enabled_features(ctx->box) &
-	     MAILBOX_FEATURE_CONDSTORE) != 0) {
+	     MAILBOX_FEATURE_CONDSTORE) != 0 &&
+	    !ctx->client->nonpermanent_modseqs) {
 		imap_sync_add_modseq(ctx, str);
 		str_append_c(str, ' ');
 	}


More information about the dovecot-cvs mailing list