dovecot-1.0: Even if mailbox sync fails, commit the transaction ...

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


details:   http://hg.dovecot.org/dovecot-1.0/rev/86766f448e50
changeset: 5320:86766f448e50
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jun 17 22:08:49 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 e1cd11c5e00a -r 86766f448e50 src/pop3/client.c
--- a/src/pop3/client.c	Sun Jun 17 22:01:15 2007 +0300
+++ b/src/pop3/client.c	Sun Jun 17 22:08:49 2007 +0300
@@ -102,7 +102,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;
 		}
 
@@ -113,8 +113,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