[dovecot-cvs] dovecot/src/lib-storage/index index-mail-headers.c, 1.25, 1.26 index-mail.c, 1.41, 1.42 index-mail.h, 1.16, 1.17 index-transaction.c, 1.7, 1.8

cras at dovecot.org cras at dovecot.org
Fri Jul 9 03:10:40 EEST 2004


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

Modified Files:
	index-mail-headers.c index-mail.c index-mail.h 
	index-transaction.c 
Log Message:
Always create cache transaction. Easier that way .. and fixes a crash.



Index: index-mail-headers.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail-headers.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- index-mail-headers.c	8 Jul 2004 20:26:16 -0000	1.25
+++ index-mail-headers.c	9 Jul 2004 00:10:37 -0000	1.26
@@ -397,8 +397,6 @@
 
 	/* FIXME: add some smart checks here. we don't necessarily want to
 	   cache everything.. */
-
-	index_mail_cache_transaction_begin(mail);
 	return TRUE;
 }
 

Index: index-mail.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- index-mail.c	8 Jul 2004 20:26:16 -0000	1.41
+++ index-mail.c	9 Jul 2004 00:10:37 -0000	1.42
@@ -127,15 +127,6 @@
 	}
 }
 
-void index_mail_cache_transaction_begin(struct index_mail *mail)
-{
-	if (mail->trans->cache_trans == NULL) {
-		mail->trans->cache_trans =
-			mail_cache_get_transaction(mail->trans->cache_view,
-						   mail->trans->trans);
-	}
-}
-
 const struct mail_full_flags *index_mail_get_flags(struct mail *_mail)
 {
 	struct index_mail *mail = (struct index_mail *) _mail;
@@ -302,8 +293,6 @@
 	data->body_size = data->parts->body_size;
 	data->body_size_set = TRUE;
 
-	index_mail_cache_transaction_begin(mail);
-
 	if (!mail->mail.has_nuls && !mail->mail.has_no_nuls) {
 		/* we know the NULs now, update them */
 		if ((data->parts->flags & MESSAGE_PART_FLAG_HAS_NULS) != 0) {

Index: index-mail.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mail.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- index-mail.h	8 Jul 2004 20:26:16 -0000	1.16
+++ index-mail.h	9 Jul 2004 00:10:38 -0000	1.17
@@ -77,7 +77,6 @@
 			    struct message_header_line *hdr,
 			    struct index_mail *mail);
 
-void index_mail_cache_transaction_begin(struct index_mail *mail);
 int index_mail_parse_headers(struct index_mail *mail);
 
 void index_mail_headers_init(struct index_mail *mail);

Index: index-transaction.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-transaction.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- index-transaction.c	4 Jul 2004 20:00:47 -0000	1.7
+++ index-transaction.c	9 Jul 2004 00:10:38 -0000	1.8
@@ -11,6 +11,7 @@
 	t->trans = mail_index_transaction_begin(ibox->view, hide);
 	t->trans_view = mail_index_transaction_open_updated_view(t->trans);
 	t->cache_view = mail_cache_view_open(ibox->cache, t->trans_view);
+	t->cache_trans = mail_cache_get_transaction(t->cache_view, t->trans);
 }
 
 static void index_transaction_free(struct index_transaction_context *t)



More information about the dovecot-cvs mailing list