[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c, 1.114, 1.115
tss at dovecot.org
tss at dovecot.org
Thu Feb 1 22:35:04 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv4908
Modified Files:
index-mail.c
Log Message:
Minor optimization
Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- index-mail.c 26 Jan 2007 13:58:53 -0000 1.114
+++ index-mail.c 1 Feb 2007 22:35:01 -0000 1.115
@@ -354,11 +354,13 @@
{
const struct mail_index_header *hdr;
- /* First check if we've configured caching not to be used with
- low enough message count. */
- hdr = mail_index_get_header(mail->ibox->view);
- if (hdr->messages_count < mail->ibox->mail_cache_min_mail_count)
- return;
+ if (mail->ibox->mail_cache_min_mail_count > 0) {
+ /* First check if we've configured caching not to be used with
+ low enough message count. */
+ hdr = mail_index_get_header(mail->ibox->view);
+ if (hdr->messages_count < mail->ibox->mail_cache_min_mail_count)
+ return;
+ }
mail_cache_add(mail->trans->cache_trans, mail->data.seq,
field_idx, data, data_size);
More information about the dovecot-cvs
mailing list