[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.63, 1.64

cras at dovecot.org cras at dovecot.org
Sat Jul 31 02:25:17 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv23160/lib-storage/index/mbox

Modified Files:
	mbox-sync.c 
Log Message:
Rollback index sync if mbox syncing failed



Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- mbox-sync.c	30 Jul 2004 09:17:06 -0000	1.63
+++ mbox-sync.c	30 Jul 2004 23:25:14 -0000	1.64
@@ -1196,7 +1196,9 @@
 	}
 	sync_ctx.t = NULL;
 
-	if (mail_index_sync_commit(index_sync_ctx) < 0) {
+	if (ret < 0)
+		mail_index_sync_rollback(index_sync_ctx);
+	else if (mail_index_sync_commit(index_sync_ctx) < 0) {
 		mail_storage_set_index_error(ibox);
 		ret = -1;
 	}



More information about the dovecot-cvs mailing list