[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c, 1.93.2.8, 1.93.2.9
tss at dovecot.org
tss at dovecot.org
Thu Feb 1 22:34:34 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv4899
Modified Files:
Tag: branch_1_0
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.93.2.8
retrieving revision 1.93.2.9
diff -u -d -r1.93.2.8 -r1.93.2.9
--- index-mail.c 26 Jan 2007 13:58:32 -0000 1.93.2.8
+++ index-mail.c 1 Feb 2007 22:34:30 -0000 1.93.2.9
@@ -349,11 +349,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