[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c, 1.93.2.1, 1.93.2.2

cras at dovecot.org cras at dovecot.org
Mon May 8 14:42:55 EEST 2006


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

Modified Files:
      Tag: branch_1_0
	index-mail.c 
Log Message:
MAIL_CACHE_FLAG_TEXT_PLAIN_7BIT_ASCII wasn't necessarily saved to cache
always



Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.93.2.1
retrieving revision 1.93.2.2
diff -u -d -r1.93.2.1 -r1.93.2.2
--- index-mail.c	8 May 2006 11:27:30 -0000	1.93.2.1
+++ index-mail.c	8 May 2006 11:42:53 -0000	1.93.2.2
@@ -367,7 +367,7 @@
 	buffer_t *buffer;
 	const void *buf_data;
 	size_t buf_size;
-	uint32_t cache_flags;
+	uint32_t cache_flags = data->cache_flags;
 
 	i_assert(data->parts == NULL);
 	i_assert(data->parser_ctx != NULL);
@@ -390,7 +390,7 @@
 
 	if (data->parsed_bodystructure &&
 	    imap_bodystructure_is_plain_7bit(data->parts)) {
-		data->cache_flags |= MAIL_CACHE_FLAG_TEXT_PLAIN_7BIT_ASCII;
+		cache_flags |= MAIL_CACHE_FLAG_TEXT_PLAIN_7BIT_ASCII;
 		/* we need message_parts cached to be able to
 		   actually use it in BODY/BODYSTRUCTURE reply */
 		need_parts = TRUE;
@@ -399,10 +399,10 @@
 	data->body_size = data->parts->body_size;
 	data->body_size_set = TRUE;
 
-	cache_flags = data->cache_flags & ~(MAIL_CACHE_FLAG_BINARY_HEADER |
-					    MAIL_CACHE_FLAG_BINARY_BODY |
-					    MAIL_CACHE_FLAG_HAS_NULS |
-					    MAIL_CACHE_FLAG_HAS_NO_NULS);
+	cache_flags &= ~(MAIL_CACHE_FLAG_BINARY_HEADER |
+			 MAIL_CACHE_FLAG_BINARY_BODY |
+			 MAIL_CACHE_FLAG_HAS_NULS |
+			 MAIL_CACHE_FLAG_HAS_NO_NULS);
 	if (!mail->mail.mail.has_nuls && !mail->mail.mail.has_no_nuls) {
 		/* we know the NULs now, update them */
 		if ((data->parts->flags & MESSAGE_PART_FLAG_HAS_NULS) != 0) {



More information about the dovecot-cvs mailing list