Changeset 5127:eb5db1cd5251

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

Handle a missing or corrupted header cache entry (closes #2676)
If imap_hcache_get fails, stop parsing the header cache and simply
refetch from that point on.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • imap/message.c

    r5120 r5127  
    162162        } 
    163163 
     164        /* hole in the header cache */ 
     165        if (!evalhc) 
     166          continue; 
     167 
    164168        if ((mfhrc = msg_fetch_header (ctx, &h, idata->buf, NULL)) == -1) 
    165169          continue; 
     
    191195        } 
    192196        else 
    193           /* bad header in the cache, we'll have to refetch. 
    194            * TODO: consider the possibility of a holey cache. */ 
     197        { 
     198          /* bad header in the cache, we'll have to refetch. */ 
     199          dprint (3, (debugfile, "bad cache entry at %d, giving up\n", h.sid - 1)); 
    195200          imap_free_header_data((void**) (void*) &h.data); 
     201          evalhc = 0; 
     202        } 
    196203      } 
    197204      while (rc != IMAP_CMD_OK && mfhrc == -1);