]> granicus.if.org Git - neomutt/commitdiff
On Sunday, 13 July 2003 at 18:09, Brendan Cully wrote:
authorBrendan Cully <brendan@kublai.com>
Mon, 14 Jul 2003 12:19:07 +0000 (12:19 +0000)
committerBrendan Cully <brendan@kublai.com>
Mon, 14 Jul 2003 12:19:07 +0000 (12:19 +0000)
> The attached patch should help when the connection to your postponed
> folder times out and you can't reconnect without restarting mutt. I'd
> like anyone who has that problem to try it and let me know how it
> works.

I dug a little deeper. The attached patch seems to work better. It
complains the first time you try to recall a message, but works the
second.

imap/command.c
imap/imap.c

index 39a5bd076f602e9b594bcbac38e9ea9cff1eb811..71b4b87980bd08a677197a6db53f49dc2bdecd2b 100644 (file)
@@ -288,6 +288,11 @@ static void cmd_handle_fatal (IMAP_DATA* idata)
     mutt_error (_("Mailbox closed"));
     mutt_sleep (1);
     idata->state = IMAP_DISCONNECTED;
+  }
+
+  if (idata->state != IMAP_SELECTED)
+  {
+    idata->state = IMAP_DISCONNECTED;
     idata->status = 0;
   }
 }
index 7093a4084661a2daefebbaf9158fd9c0c4acb1e4..36fde9e12c0371de5f0b6139dd6d97bac5b16f60 100644 (file)
@@ -680,7 +680,8 @@ int imap_open_mailbox (CONTEXT* ctx)
   return 0;
 
  fail:
-  idata->state = IMAP_AUTHENTICATED;
+  if (idata->state == IMAP_SELECTED)
+    idata->state = IMAP_AUTHENTICATED;
  fail_noidata:
   FREE (&mx.mbox);
   return -1;
@@ -706,7 +707,7 @@ int imap_open_mailbox_append (CONTEXT *ctx)
   conn = idata->conn;
 
   ctx->magic = M_IMAP;
-  ctx->data = (void *) idata;
+  ctx->data = idata;
 
   /* check mailbox existance */