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

Fix a segfault in the new mboxcache hcache lookup.
idata may not have an associated context, so the cache path must use
the account info instead. For harmony with the other hcache callers,
make them all canonify the path the same way with imap_hcache_open.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • imap/imap.c

    r5045 r5046  
    252252  header_cache_t *hc; 
    253253  char uidbuf[32]; 
    254    
    255   hc = mutt_hcache_open (HeaderCache, idata->ctx->path); 
     254 
     255  hc = imap_hcache_open (idata, idata->ctx->path); 
    256256#endif 
    257257 
     
    11581158#if USE_HCACHE 
    11591159  if (expunge && ctx->closing) 
    1160     hc = mutt_hcache_open (HeaderCache, idata->ctx->path); 
     1160    hc = imap_hcache_open (idata, idata->ctx->path); 
    11611161#endif 
    11621162 
     
    15831583  unsigned int *uidvalidity = NULL; 
    15841584  unsigned int *uidnext = NULL; 
    1585   char* path; 
    15861585#endif 
    15871586   
     
    16071606 
    16081607#ifdef USE_HCACHE 
    1609   path = safe_strdup (idata->ctx->path); 
    1610   url_parse_ciss (&url, path); 
     1608  mutt_account_tourl (&idata->conn->account, &url); 
    16111609  url.path = (char*)mbox; 
    16121610  url_ciss_tostring (&url, urlstr, sizeof (urlstr), 0); 
    1613   FREE (&path); 
    16141611  hc = mutt_hcache_open (HeaderCache, urlstr); 
    16151612  if (hc)