[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c, 1.20, 1.21 index-transaction.c, 1.5, 1.6

cras at procontrol.fi cras at procontrol.fi
Sun Jul 4 17:26:25 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv24885/lib-storage/index

Modified Files:
	index-mail-headers.c index-transaction.c 
Log Message:
Caching fixes and optimizations. Removed all network byte ordering code -
it's not worth the trouble and would require massive changes in indexing
code as well to be useful. Changed next_offset to prev_offset which is
updated while syncing index.



Index: index-mail-headers.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail-headers.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- index-mail-headers.c	22 Jun 2004 07:36:33 -0000	1.20
+++ index-mail-headers.c	4 Jul 2004 14:26:23 -0000	1.21
@@ -792,7 +792,9 @@
 	len = str_len(mail->data.header_data) -
 		data->header_data_uncached_offset;
 
-	mail_cache_add(mail->trans->cache_trans, data->seq,
-		       mail_cache_header_fields[idx], str, len+1);
+	if (len != 0) {
+		mail_cache_add(mail->trans->cache_trans, data->seq,
+			       mail_cache_header_fields[idx], str, len+1);
+	}
 	data->header_save = FALSE;
 }

Index: index-transaction.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-transaction.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- index-transaction.c	3 Jul 2004 10:57:53 -0000	1.5
+++ index-transaction.c	4 Jul 2004 14:26:23 -0000	1.6
@@ -16,7 +16,7 @@
 static void index_transaction_free(struct index_transaction_context *t)
 {
 	if (t->cache_trans != NULL)
-		(void)mail_cache_transaction_end(t->cache_trans);
+		mail_cache_transaction_end(t->cache_trans);
 
 	mail_cache_view_close(t->cache_view);
 	mail_index_view_close(t->trans_view);



More information about the dovecot-cvs mailing list