]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
QRESYNC: FETCH CHANGEDSINCE and SELECT with modseq shouldn't have returned changes...
authorTimo Sirainen <tss@iki.fi>
Fri, 24 Oct 2008 19:10:37 +0000 (22:10 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 24 Oct 2008 19:10:37 +0000 (22:10 +0300)
--HG--
branch : HEAD

src/imap/cmd-fetch.c
src/imap/cmd-select.c
src/imap/imap-fetch.c
src/imap/imap-fetch.h

index 0e50fd876d8353bdee62a325a0c6cdf41443688d..91c52eb9aead1a150c563bef2bfb58a3213de606 100644 (file)
@@ -82,7 +82,7 @@ fetch_parse_modifier(struct imap_fetch_context *ctx,
                }
                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 &
index f98ee9a19380e55a5713b9a01f21efd0cf61dd8f..bdfa87c66b9e54aafcb15f987f4405d11603debc 100644 (file)
@@ -232,7 +232,7 @@ static int select_qresync(struct imap_select_context *ctx)
        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)) {
index 51e8c109203ca989bb1c55f8729ee7a0e0f3fb61..d6c04e5f55f79a6435ea439c13f91adc23fde7c7 100644 (file)
@@ -110,8 +110,8 @@ imap_fetch_init(struct client_command_context *cmd, struct mailbox *box)
        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 @@ bool imap_fetch_add_unchanged_since(struct imap_fetch_context *ctx,
        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;
index a301ea276983ef6ff0b7307b19bad668d7d20878..e61a5336d88a3d78ea354870d6a5cae4b3892cc8 100644 (file)
@@ -101,8 +101,8 @@ int imap_fetch_deinit(struct imap_fetch_context *ctx);
 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);