dovecot: Get UIDVALIDITY after transaction has been commited. It...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jul 16 03:15:28 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/61bf911dad91
changeset: 6033:61bf911dad91
user: Timo Sirainen <tss at iki.fi>
date: Mon Jul 16 03:14:51 2007 +0300
description:
Get UIDVALIDITY after transaction has been commited. It may have changed.
diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
src/imap/cmd-append.c | 14 +++++++-------
diffs (31 lines):
diff -r 6edca218d48a -r 61bf911dad91 src/imap/cmd-append.c
--- a/src/imap/cmd-append.c Mon Jul 16 02:41:40 2007 +0300
+++ b/src/imap/cmd-append.c Mon Jul 16 03:14:51 2007 +0300
@@ -248,13 +248,6 @@ static bool cmd_append_continue_parsing(
return TRUE;
}
- if (mailbox_get_status(ctx->box, STATUS_UIDVALIDITY,
- &status) < 0) {
- client_send_storage_error(cmd, ctx->storage);
- cmd_append_finish(ctx);
- return TRUE;
- }
-
ret = mailbox_transaction_commit_get_uids(&ctx->t, 0,
&uid1, &uid2);
if (ret < 0) {
@@ -263,6 +256,13 @@ static bool cmd_append_continue_parsing(
return TRUE;
}
i_assert(ctx->count == uid2 - uid1 + 1);
+
+ if (mailbox_get_status(ctx->box, STATUS_UIDVALIDITY,
+ &status) < 0) {
+ client_send_storage_error(cmd, ctx->storage);
+ cmd_append_finish(ctx);
+ return TRUE;
+ }
if (uid1 == uid2) {
msg = t_strdup_printf("OK [APPENDUID %u %u] "
More information about the dovecot-cvs
mailing list