[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.6.2.1, 1.6.2.2

tss at dovecot.org tss at dovecot.org
Sat Nov 18 21:48:14 UTC 2006


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

Modified Files:
      Tag: branch_1_0
	maildir-keywords.c 
Log Message:
If we can't open dovecot-keywords file, don't crash.



Index: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -u -d -r1.6.2.1 -r1.6.2.2
--- maildir-keywords.c	4 Jul 2006 17:03:27 -0000	1.6.2.1
+++ maildir-keywords.c	18 Nov 2006 21:48:12 -0000	1.6.2.2
@@ -219,7 +219,10 @@
 	idx = maildir_keywords_lookup(mk, name);
 	if (idx >= 0)
 		return idx;
-	i_assert(mk->synced);
+	if (!mk->synced) {
+		/* we couldn't open the dovecot-keywords file. */
+		return -1;
+	}
 
 	/* see if we are full */
 	keywords = array_get(&mk->list, &count);



More information about the dovecot-cvs mailing list