[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dovecot-cvs
Subject:    [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-sync.c,
From:       cras () dovecot ! org (cras () dovecot ! org)
Date:       2004-10-24 3:22:14
Message-ID: 20041024002213.47A0FC000D95 () talvi ! dovecot ! org
[Download RAW message or body]

Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv23050/lib-storage/index/maildir

Modified Files:
	maildir-sync.c 
Log Message:
Don't crash to asserts



Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- maildir-sync.c	4 Oct 2004 16:31:51 -0000	1.41
+++ maildir-sync.c	24 Oct 2004 00:22:11 -0000	1.42
@@ -600,8 +600,12 @@
 	}
 	sync_ctx.view = view;
 
-	ret = mail_index_get_header(view, &hdr);
-	i_assert(ret == 0); /* view is locked, can't happen */
+	if (mail_index_get_header(view, &hdr) < 0) {
+		/* view is invalidated */
+		mail_storage_set_index_error(ibox);
+		(void)mail_index_sync_rollback(sync_ctx.sync_ctx);
+		return -1;
+	}
 
 	uid_validity = maildir_uidlist_get_uid_validity(ibox->uidlist);
 	if (uid_validity != hdr->uid_validity &&

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic