Changeset 5034:f467353f5657 for pop.c

Show
Ignore:
Timestamp:
2007-03-31 18:50:39 (22 months ago)
Author:
Brendan Cully <brendan@…>
Branch:
default
Message:

Add tmp flag to bcache_put, create bcache_commit.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pop.c

    r5027 r5034  
    429429 
    430430/* close POP mailbox */ 
    431 void pop_close_mailbox (CONTEXT *ctx) 
     431int pop_close_mailbox (CONTEXT *ctx) 
    432432{ 
    433433  POP_DATA *pop_data = (POP_DATA *)ctx->data; 
    434434 
    435435  if (!pop_data) 
    436     return; 
     436    return 0; 
    437437 
    438438  pop_logout (ctx); 
     
    451451  mutt_bcache_close (&pop_data->bcache); 
    452452 
    453   return; 
     453  return 0; 
    454454} 
    455455 
     
    515515 
    516516    /* see if we can put in body cache; use our cache as fallback */ 
    517     if (!(msg->fp = mutt_bcache_put (pop_data->bcache, h->data))) 
     517    if (!(msg->fp = mutt_bcache_put (pop_data->bcache, h->data, 1))) 
    518518    { 
    519519      /* no */ 
     
    539539     * the file in bcache or from POP's own cache since the next iteration 
    540540     * of the loop will re-attempt to put() the message */ 
    541     if (bcache) 
    542       mutt_bcache_del (pop_data->bcache, h->data); 
    543     else 
     541    if (!bcache) 
    544542      unlink (path); 
    545543 
     
    562560   * portion of the headers, those required for the main display. 
    563561   */ 
    564   if (!bcache) 
     562  if (bcache) 
     563    mutt_bcache_commit (pop_data->bcache, h->data); 
     564  else 
    565565  { 
    566566    cache->index = h->index;