changeset 21679:d439e77f6b1f

pop3c: Remove unnecessarily duplicated code setting vsize to cache This is important now that the vsize can be added also to index's vsize extension.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 22 Feb 2017 20:04:28 +0200
parents 3243312b3d88
children f0a1e12fc57e
files src/lib-storage/index/pop3c/pop3c-mail.c
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/pop3c/pop3c-mail.c	Wed Feb 22 20:03:43 2017 +0200
+++ b/src/lib-storage/index/pop3c/pop3c-mail.c	Wed Feb 22 20:04:28 2017 +0200
@@ -110,22 +110,13 @@
 
 static void pop3c_mail_cache_size(struct index_mail *mail)
 {
-	struct mail *_mail = &mail->mail.mail;
 	uoff_t size;
-	unsigned int cache_idx;
 
 	if (i_stream_get_size(mail->data.stream, TRUE, &size) <= 0)
 		return;
 	mail->data.virtual_size = size;
-
-	cache_idx = mail->ibox->cache_fields[MAIL_CACHE_VIRTUAL_FULL_SIZE].idx;
-	if (mail_cache_field_exists(_mail->transaction->cache_view,
-				    _mail->seq, cache_idx) == 0) {
-		index_mail_cache_add_idx(mail, cache_idx, &size, sizeof(size));
-		/* make sure it's not cached twice */
-		mail->data.dont_cache_fetch_fields |=
-			MAIL_CACHE_VIRTUAL_FULL_SIZE;
-	}
+	/* it'll be actually added to index when closing the mail in
+	   index_mail_cache_sizes() */
 }
 
 static void