Mercurial > dovecot > original-hg > dovecot-1.2
diff src/imap/imap-fetch.c @ 7817:ffaf1ea49704 HEAD
QRESYNC: Send HIGHESTMODSEQ automatically in all tagged replies whenever it
seems useful.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 11 Jun 2008 15:44:35 +0300 |
parents | 2d62129a709b |
children | c1bbdc2b262e |
line wrap: on
line diff
--- a/src/imap/imap-fetch.c Wed Jun 11 15:43:12 2008 +0300 +++ b/src/imap/imap-fetch.c Wed Jun 11 15:44:35 2008 +0300 @@ -740,8 +740,13 @@ static int fetch_modseq(struct imap_fetch_context *ctx, struct mail *mail, void *context ATTR_UNUSED) { + uint64_t modseq; + + modseq = mail_get_modseq(mail); + if (ctx->client->highest_fetch_modseq < modseq) + ctx->client->highest_fetch_modseq = modseq; str_printfa(ctx->cur_str, "MODSEQ %llu ", - (unsigned long long)mail_get_modseq(mail)); + (unsigned long long)modseq); return 1; } @@ -752,7 +757,6 @@ client_enable(ctx->client, MAILBOX_FEATURE_CONDSTORE); imap_fetch_add_handler(ctx, TRUE, FALSE, name, NULL, fetch_modseq, NULL); - ctx->client->modseqs_sent_since_sync = TRUE; return TRUE; }