dovecot-2.0: imap: Use mailbox_get_expunged_uids() for QRESYNC c...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Mar 26 00:42:52 EET 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/e5547c86528f
changeset: 12704:e5547c86528f
user: Timo Sirainen <tss at iki.fi>
date: Sat Mar 26 00:39:40 2011 +0200
description:
imap: Use mailbox_get_expunged_uids() for QRESYNC code.
diffstat:
src/imap/imap-fetch.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diffs (46 lines):
diff -r 99e3209fc78d -r e5547c86528f src/imap/imap-fetch.c
--- a/src/imap/imap-fetch.c Sat Mar 26 00:33:51 2011 +0200
+++ b/src/imap/imap-fetch.c Sat Mar 26 00:39:40 2011 +0200
@@ -261,16 +261,6 @@
return ret;
}
-static void
-mailbox_expunge_to_range(const ARRAY_TYPE(mailbox_expunge_rec) *input,
- ARRAY_TYPE(seq_range) *output)
-{
- const struct mailbox_expunge_rec *expunge;
-
- array_foreach(input, expunge)
- seq_range_array_add(output, 0, expunge->uid);
-}
-
static int
imap_fetch_send_vanished(struct imap_fetch_context *ctx)
{
@@ -278,16 +268,12 @@
const struct mail_search_arg *modseqarg = uidarg->next;
const ARRAY_TYPE(seq_range) *uid_filter = &uidarg->value.seqset;
uint64_t modseq = modseqarg->value.modseq->modseq - 1;
- ARRAY_TYPE(mailbox_expunge_rec) expunged_uids;
ARRAY_TYPE(seq_range) expunged_uids_range;
string_t *str;
int ret = 0;
- i_array_init(&expunged_uids, array_count(uid_filter));
i_array_init(&expunged_uids_range, array_count(uid_filter));
- if (mailbox_get_expunges(ctx->box, modseq, uid_filter, &expunged_uids))
- mailbox_expunge_to_range(&expunged_uids, &expunged_uids_range);
- else {
+ if (!mailbox_get_expunged_uids(ctx->box, modseq, uid_filter, &expunged_uids_range)) {
/* return all expunged UIDs */
if (get_expunges_fallback(ctx, uid_filter,
&expunged_uids_range) < 0) {
@@ -303,7 +289,6 @@
o_stream_send(ctx->client->output, str_data(str), str_len(str));
str_free(&str);
}
- array_free(&expunged_uids);
array_free(&expunged_uids_range);
return ret;
}
More information about the dovecot-cvs
mailing list