Changeset 5127:eb5db1cd5251
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5120
|
r5127
|
|
| 162 | 162 | } |
| 163 | 163 | |
| | 164 | /* hole in the header cache */ |
| | 165 | if (!evalhc) |
| | 166 | continue; |
| | 167 | |
| 164 | 168 | if ((mfhrc = msg_fetch_header (ctx, &h, idata->buf, NULL)) == -1) |
| 165 | 169 | continue; |
| … |
… |
|
| 191 | 195 | } |
| 192 | 196 | 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)); |
| 195 | 200 | imap_free_header_data((void**) (void*) &h.data); |
| | 201 | evalhc = 0; |
| | 202 | } |
| 196 | 203 | } |
| 197 | 204 | while (rc != IMAP_CMD_OK && mfhrc == -1); |