Manually unidle at logout if necessary. Somewhat unclean - might be good
authorBrendan Cully <brendan@kublai.com>
Mon, 19 Dec 2005 17:32:38 +0000 (17:32 +0000)
committerBrendan Cully <brendan@kublai.com>
Mon, 19 Dec 2005 17:32:38 +0000 (17:32 +0000)
to have an imap_unidle function...

imap/imap.c

index a508b2da10a13097fec49b3f8b7926f91fb490fe..689f82accbbc4118e94eda37e048d131e5017eee 100644 (file)
@@ -1146,6 +1146,11 @@ void imap_close_mailbox (CONTEXT* ctx)
        * and the mailbox is unchanged, so we may have to close here */
       if (!ctx->deleted && imap_exec (idata, "CLOSE", 0))
         mutt_error (_("CLOSE failed"));
+      if (idata->state == IMAP_IDLE)
+      {
+        mutt_buffer_addstr (idata->cmdbuf, "DONE\r\n");
+        idata->state = IMAP_SELECTED;
+      }      
       idata->state = IMAP_AUTHENTICATED;
     }