Show
Ignore:
Timestamp:
2007-04-02 10:36:20 (22 months ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

Push mbox cache header cache check into imap_mboxcache_get

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • imap/command.c

    r5033 r5043  
    822822  IMAP_STATUS *status, sb; 
    823823  int olduv, oldun; 
    824 #if USE_HCACHE 
    825   header_cache_t *hc = NULL; 
    826   unsigned int *uidvalidity = NULL; 
    827   unsigned int *uidnext = NULL; 
    828 #endif 
    829824 
    830825  mailbox = imap_next_word (s); 
     
    912907                    mailbox, olduv, oldun, status->unseen)); 
    913908         
    914 #if USE_HCACHE 
    915         /* fetch seen info from hcache if we haven't seen it yet this session */ 
    916         if (!olduv && !oldun) 
    917         { 
    918           hc = mutt_hcache_open (HeaderCache, inc->path); 
    919           if (hc) 
    920           { 
    921             uidvalidity = mutt_hcache_fetch_raw (hc, "/UIDVALIDITY", imap_hcache_keylen); 
    922             uidnext = mutt_hcache_fetch_raw (hc, "/UIDNEXT", imap_hcache_keylen); 
    923             olduv = uidvalidity ? *uidvalidity : 0; 
    924             oldun = uidnext ? *uidnext : 0; 
    925             FREE (&uidvalidity); 
    926             FREE (&uidnext); 
    927             mutt_hcache_close (hc); 
    928             dprint (3, (debugfile, "hcache olduv %d, oldun %d\n", olduv, oldun)); 
    929           } 
    930         } 
    931 #endif 
    932909        if (olduv && olduv == status->uidvalidity) 
    933910        {