[dovecot-cvs] dovecot/src/lib-index mail-hash.c, 1.28, 1.29 mail-hash.h, 1.13, 1.14

tss at dovecot.org tss at dovecot.org
Wed Dec 20 03:38:43 UTC 2006


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

Modified Files:
	mail-hash.c mail-hash.h 
Log Message:
Implemented X-REFERENCES2 threading. Two differences to standard REFERENCES:
Sort root nodes by the newest mail in the thread, and don't do base subject
merging.



Index: mail-hash.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-hash.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- mail-hash.c	17 Dec 2006 16:35:32 -0000	1.28
+++ mail-hash.c	20 Dec 2006 03:38:40 -0000	1.29
@@ -189,6 +189,9 @@
 
 static void mail_hash_file_close(struct mail_hash *hash)
 {
+	if (hash->file_lock != NULL)
+		file_lock_free(&hash->file_lock);
+
 	if (hash->mmap_base != NULL) {
 		if (hash->mmap_anon) {
 			if (munmap_anon(hash->mmap_base, hash->mmap_size) < 0) {
@@ -451,6 +454,9 @@
 
 		hash->locked = TRUE;
 		ret = mail_hash_file_map(hash, TRUE);
+
+		if (ret <= 0)
+			mail_hash_file_unlock(hash);
 	}
 	return ret;
 }

Index: mail-hash.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-hash.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- mail-hash.h	15 Dec 2006 18:10:55 -0000	1.13
+++ mail-hash.h	20 Dec 2006 03:38:40 -0000	1.14
@@ -53,6 +53,8 @@
 	uint32_t uid;
 	/* user_data[] */
 };
+#define MAIL_HASH_RECORD_IS_DELETED(rec) \
+	((rec)->uid == (uint32_t)-1)
 
 enum mail_hash_open_flags {
 	MAIL_HASH_OPEN_FLAG_CREATE	= 0x01,



More information about the dovecot-cvs mailing list