[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-transaction.c, 1.11, 1.11.2.1
tss at dovecot.org
tss at dovecot.org
Thu Jan 25 17:24:46 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv20254/lib-storage/index/maildir
Modified Files:
Tag: branch_1_0
maildir-transaction.c
Log Message:
If save_commit_pre() fails, rollback the transaction.
Index: maildir-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-transaction.c,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -d -r1.11 -r1.11.2.1
--- maildir-transaction.c 6 Mar 2006 18:16:12 -0000 1.11
+++ maildir-transaction.c 25 Jan 2007 17:24:44 -0000 1.11.2.1
@@ -33,8 +33,12 @@
save_ctx = t->save_ctx;
- if (index_transaction_commit(_t) < 0)
- ret = -1;
+ if (ret < 0)
+ index_transaction_rollback(_t);
+ else {
+ if (index_transaction_commit(_t) < 0)
+ ret = -1;
+ }
/* transaction is destroyed. */
t = NULL; _t = NULL;
More information about the dovecot-cvs
mailing list