dovecot-1.2: QRESYNC: FETCH CHANGEDSINCE and SELECT with modseq ...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 24 22:10:41 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/66a792567e59
changeset: 8322:66a792567e59
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 24 22:10:37 2008 +0300
description:
QRESYNC: FETCH CHANGEDSINCE and SELECT with modseq shouldn't have returned changes with the same modseq.
diffstat:
4 files changed, 7 insertions(+), 7 deletions(-)
src/imap/cmd-fetch.c | 2 +-
src/imap/cmd-select.c | 2 +-
src/imap/imap-fetch.c | 6 +++---
src/imap/imap-fetch.h | 4 ++--
diffs (61 lines):
diff -r b62e350500c9 -r 66a792567e59 src/imap/cmd-fetch.c
--- 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 @@ fetch_parse_modifier(struct imap_fetch_c
}
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 &
diff -r b62e350500c9 -r 66a792567e59 src/imap/cmd-select.c
--- 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 @@ static int select_qresync(struct imap_se
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)) {
diff -r b62e350500c9 -r 66a792567e59 src/imap/imap-fetch.c
--- 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 @@ imap_fetch_init(struct client_command_co
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(stru
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;
diff -r b62e350500c9 -r 66a792567e59 src/imap/imap-fetch.h
--- 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
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);
More information about the dovecot-cvs
mailing list