Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5760:7851879631ea HEAD
Always commit FETCH transaction to make sure cached data is committed.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 17 Jun 2007 22:01:16 +0300 |
parents | 6074f59f91ba |
children | 8008fbb660c1 |
files | src/imap/imap-fetch.c |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-fetch.c Sun Jun 17 18:13:19 2007 +0300 +++ b/src/imap/imap-fetch.c Sun Jun 17 22:01:16 2007 +0300 @@ -384,12 +384,11 @@ mailbox_header_lookup_deinit(&ctx->all_headers_ctx); if (ctx->trans != NULL) { - if (ctx->failed) - mailbox_transaction_rollback(&ctx->trans); - else { - if (mailbox_transaction_commit(&ctx->trans, 0) < 0) - ctx->failed = TRUE; - } + /* even if something failed, we want to commit changes to + cache, as well as possible \Seen flag changes for FETCH + replies we returned so far. */ + if (mailbox_transaction_commit(&ctx->trans, 0) < 0) + ctx->failed = TRUE; } return ctx->failed ? -1 : 0; }