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

Allow IMAP FCC to reconnect if append fails (closes: #890)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • imap/imap.c

    r5028 r5033  
    6464  char mailbox[LONG_STRING]; 
    6565  char mbox[LONG_STRING]; 
     66  int rc; 
    6667 
    6768  if (imap_parse_path (path, &mx)) 
     
    9798  } 
    9899 
    99   if (imap_exec (idata, buf, IMAP_CMD_FAIL_OK) < 0) 
     100  if ((rc = imap_exec (idata, buf, IMAP_CMD_FAIL_OK)) < 0) 
    100101  { 
    101102    dprint (1, (debugfile, "imap_access: Can't check STATUS of %s\n", mbox)); 
    102     return -1; 
     103    return rc; 
    103104  } 
    104105 
     
    341342    } 
    342343    if (flags & M_IMAP_CONN_NOSELECT && idata && idata->state >= IMAP_SELECTED) 
     344      continue; 
     345    if (idata && idata->status == IMAP_FATAL) 
    343346      continue; 
    344347    break; 
     
    772775  char mailbox[LONG_STRING]; 
    773776  IMAP_MBOX mx; 
     777  int rc; 
    774778 
    775779  if (imap_parse_path (ctx->path, &mx)) 
     
    794798 
    795799  /* really we should also check for W_OK */ 
    796   if (!imap_access (ctx->path, F_OK)) 
     800  if ((rc = imap_access (ctx->path, F_OK)) == 0) 
    797801    return 0; 
     802 
     803  if (rc == -1) 
     804    return -1; 
    798805 
    799806  snprintf (buf, sizeof (buf), _("Create %s?"), mailbox);