[dovecot-cvs] dovecot/src/lib-storage/index index-sync.c,1.51,1.52

cras at dovecot.org cras at dovecot.org
Sat Jan 7 02:17:54 EET 2006


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

Modified Files:
	index-sync.c 
Log Message:
Crashfix to last keyword compare update



Index: index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-sync.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- index-sync.c	6 Jan 2006 17:37:30 -0000	1.51
+++ index-sync.c	7 Jan 2006 00:17:52 -0000	1.52
@@ -276,6 +276,11 @@
 	const unsigned int *idx1, *idx2;
 	unsigned int i, j, count1, count2;
 
+	if (!array_is_created(k1))
+		return !array_is_created(k2) || array_count(k2) == 0;
+	if (!array_is_created(k2))
+		return FALSE;
+
 	/* The arrays may not be sorted, but they usually are. Optimize for
 	   the assumption that they are */
 	idx1 = array_get(k1, &count1);



More information about the dovecot-cvs mailing list