[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c,1.61,1.62

cras at dovecot.org cras at dovecot.org
Fri Oct 15 00:54:49 EEST 2004


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

Modified Files:
	index-mail.c 
Log Message:
Don't crash even if view is inconsistent.



Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- index-mail.c	8 Oct 2004 17:51:49 -0000	1.61
+++ index-mail.c	14 Oct 2004 21:54:47 -0000	1.62
@@ -605,10 +605,10 @@
 	mail->mail = *t->ibox->mail_interface;
 	mail->mail.box = &t->ibox->box;
 
+	/* only reason we couldn't get header is if view is invalidated */
 	ret = mail_index_get_header(t->ibox->view, &hdr);
-	i_assert(ret == 0);
-
-	mail->uid_validity = hdr->uid_validity;
+	if (ret == 0)
+		mail->uid_validity = hdr->uid_validity;
 
 	mail->pool = pool_alloconly_create("index_mail", 16384);
 	mail->ibox = t->ibox;



More information about the dovecot-cvs mailing list