[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c, 1.56, 1.57 index-storage.h, 1.77, 1.78

cras at dovecot.org cras at dovecot.org
Fri Sep 10 14:45:23 EEST 2004


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

Modified Files:
	index-mail.c index-storage.h 
Log Message:
Removed all "unreliable headers" handling code. With mbox we actually handle
only virtual header sizes everywhere.



Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- index-mail.c	10 Sep 2004 11:25:33 -0000	1.56
+++ index-mail.c	10 Sep 2004 11:45:20 -0000	1.57
@@ -36,7 +36,6 @@
 {
 	struct mail_cache_field *cache_fields = mail->ibox->cache_fields;
 	struct message_part *part;
-	const struct message_size *new_hdr_size;
 	buffer_t *part_buf;
 	const char *error;
 
@@ -50,21 +49,10 @@
 		return NULL;
 	}
 
-	if (!mail->ibox->unreliable_headers)
-		new_hdr_size = NULL;
-	else {
-		if (!mail->data.hdr_size_set) {
-			if (index_mail_parse_headers(mail, NULL) < 0)
-				return NULL;
-		}
-
-		new_hdr_size = &mail->data.hdr_size;
-	}
-
 	part = message_part_deserialize(mail->pool,
 					buffer_get_data(part_buf, NULL),
 					buffer_get_used_size(part_buf),
-					new_hdr_size, &error);
+					&error);
 	t_pop();
 
 	if (part == NULL) {
@@ -267,11 +255,8 @@
 		data->parts = get_cached_parts(mail);
 
 	if (data->parts != NULL) {
-		if (!mail->ibox->unreliable_headers) {
-			/* headers don't change, physical_size is reliable */
-			data->hdr_size_set = TRUE;
-			data->hdr_size = data->parts->header_size;
-		}
+		data->hdr_size_set = TRUE;
+		data->hdr_size = data->parts->header_size;
 		data->body_size = data->parts->body_size;
 		data->body_size_set = TRUE;
 		data->virtual_size = data->parts->header_size.virtual_size +

Index: index-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-storage.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- index-storage.h	4 Sep 2004 12:44:14 -0000	1.77
+++ index-storage.h	10 Sep 2004 11:45:20 -0000	1.78
@@ -101,7 +101,6 @@
 	unsigned int notify_pending:1;
 	unsigned int mail_read_mmaped:1;
 	unsigned int syncing_commit:1;
-	unsigned int unreliable_headers:1;
 	unsigned int mbox_sync_dirty:1;
 	unsigned int mbox_do_dirty_syncs:1;
 };



More information about the dovecot-cvs mailing list