Show
Ignore:
Timestamp:
2007-04-10 16:07:53 (21 months ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

Do not hold hcache open while mailbox is open - it can lead to lockups

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • imap/imap.c

    r5111 r5112  
    249249  int i, cacheno; 
    250250 
     251#ifdef USE_HCACHE 
     252  imap_hcache_open (idata); 
     253#endif 
     254 
    251255  for (i = 0; i < idata->ctx->msgcount; i++) 
    252256  { 
     
    277281    } 
    278282  } 
     283 
     284#if USE_HCACHE 
     285  imap_hcache_close (idata); 
     286#endif 
    279287 
    280288  /* We may be called on to expunge at any time. We can't rely on the caller 
     
    735743  ctx->v2r = safe_calloc (count, sizeof (int)); 
    736744  ctx->msgcount = 0; 
    737 #ifdef USE_HCACHE 
    738   idata->hcache = imap_hcache_open (idata, idata->ctx->path); 
    739 #endif 
     745 
    740746  if (count && (imap_read_headers (idata, 0, count-1) < 0)) 
    741747  { 
     
    11401146  } 
    11411147 
     1148#if USE_HCACHE 
     1149  imap_hcache_open (idata); 
     1150#endif 
     1151 
    11421152  /* save messages with real (non-flag) changes */ 
    11431153  for (n = 0; n < ctx->msgcount; n++) 
     
    11751185  } 
    11761186 
     1187#if USE_HCACHE 
     1188  imap_hcache_close (idata); 
     1189#endif 
     1190 
    11771191  /* sync +/- flags for the five flags mutt cares about */ 
    11781192  rc = 0; 
     
    13081322  } 
    13091323 
    1310 #ifdef USE_HCACHE 
    1311   mutt_hcache_close (idata->hcache); 
    1312   idata->hcache = NULL; 
    1313 #endif 
    13141324  mutt_bcache_close (&idata->bcache); 
    13151325