Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8322:66a792567e59 HEAD
QRESYNC: FETCH CHANGEDSINCE and SELECT with modseq shouldn't have returned changes with the same modseq.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 24 Oct 2008 22:10:37 +0300 |
parents | b62e350500c9 |
children | 60c48789841b |
files | src/imap/cmd-fetch.c src/imap/cmd-select.c src/imap/imap-fetch.c src/imap/imap-fetch.h |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-fetch.c Fri Oct 24 01:56:13 2008 +0300 +++ b/src/imap/cmd-fetch.c Fri Oct 24 22:10:37 2008 +0300 @@ -82,7 +82,7 @@ } num = strtoull(imap_arg_string(*args), NULL, 10); *args += 1; - return imap_fetch_add_unchanged_since(ctx, num); + return imap_fetch_add_changed_since(ctx, num); } if (strcmp(name, "VANISHED") == 0 && ctx->cmd->uid) { if ((ctx->client->enabled_features &
--- a/src/imap/cmd-select.c Fri Oct 24 01:56:13 2008 +0300 +++ b/src/imap/cmd-select.c Fri Oct 24 22:10:37 2008 +0300 @@ -232,7 +232,7 @@ fetch_ctx->qresync_sample_seqset = &ctx->qresync_sample_seqset; fetch_ctx->qresync_sample_uidset = &ctx->qresync_sample_uidset; - if (!imap_fetch_add_unchanged_since(fetch_ctx, ctx->qresync_modseq) || + if (!imap_fetch_add_changed_since(fetch_ctx, ctx->qresync_modseq) || !imap_fetch_init_handler(fetch_ctx, "UID", NULL) || !imap_fetch_init_handler(fetch_ctx, "FLAGS", NULL) || !imap_fetch_init_handler(fetch_ctx, "MODSEQ", NULL)) {
--- a/src/imap/imap-fetch.c Fri Oct 24 01:56:13 2008 +0300 +++ b/src/imap/imap-fetch.c Fri Oct 24 22:10:37 2008 +0300 @@ -110,8 +110,8 @@ return ctx; } -bool imap_fetch_add_unchanged_since(struct imap_fetch_context *ctx, - uint64_t modseq) +bool imap_fetch_add_changed_since(struct imap_fetch_context *ctx, + uint64_t modseq) { struct mail_search_arg *search_arg; @@ -119,7 +119,7 @@ search_arg->type = SEARCH_MODSEQ; search_arg->value.modseq = p_new(ctx->cmd->pool, struct mail_search_modseq, 1); - search_arg->value.modseq->modseq = modseq; + search_arg->value.modseq->modseq = modseq + 1; search_arg->next = ctx->search_args->args->next; ctx->search_args->args->next = search_arg;
--- a/src/imap/imap-fetch.h Fri Oct 24 01:56:13 2008 +0300 +++ b/src/imap/imap-fetch.h Fri Oct 24 22:10:37 2008 +0300 @@ -101,8 +101,8 @@ bool imap_fetch_init_handler(struct imap_fetch_context *ctx, const char *name, const struct imap_arg **args); -bool imap_fetch_add_unchanged_since(struct imap_fetch_context *ctx, - uint64_t modseq); +bool imap_fetch_add_changed_since(struct imap_fetch_context *ctx, + uint64_t modseq); int imap_fetch_begin(struct imap_fetch_context *ctx); int imap_fetch_more(struct imap_fetch_context *ctx);