dovecot: Even if mailbox sync fails, commit the transaction so t...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jun 17 22:08:56 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/8008fbb660c1
changeset: 5761:8008fbb660c1
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jun 17 22:08:50 2007 +0300
description:
Even if mailbox sync fails, commit the transaction so that cache file gets
updated.

diffstat:

1 file changed, 4 insertions(+), 3 deletions(-)
src/pop3/client.c |    7 ++++---

diffs (24 lines):

diff -r 7851879631ea -r 8008fbb660c1 src/pop3/client.c
--- a/src/pop3/client.c	Sun Jun 17 22:01:16 2007 +0300
+++ b/src/pop3/client.c	Sun Jun 17 22:08:50 2007 +0300
@@ -101,7 +101,7 @@ static int init_mailbox(struct client *c
 		mail_free(&mail);
 		if (mailbox_search_deinit(&ctx) < 0) {
 			client_send_storage_error(client);
-			mailbox_transaction_rollback(&t);
+			(void)mailbox_transaction_commit(&t, 0);
 			break;
 		}
 
@@ -112,8 +112,9 @@ static int init_mailbox(struct client *c
 			return TRUE;
 		}
 
-		/* well, sync and try again */
-		mailbox_transaction_rollback(&t);
+		/* well, sync and try again. we might have cached virtual
+		   sizes, make sure they get committed. */
+		(void)mailbox_transaction_commit(&t, 0);
 	}
 
 	if (i == 2)


More information about the dovecot-cvs mailing list