IMAP: only close socket when not already disconnected.
authorBrendan Cully <brendan@kublai.com>
Tue, 27 Jan 2009 20:17:23 +0000 (12:17 -0800)
committerBrendan Cully <brendan@kublai.com>
Tue, 27 Jan 2009 20:17:23 +0000 (12:17 -0800)
ChangeLog
imap/imap.c

index 63636fc57f63d711dcd41e088f0a69f2cad2a3ec..9d61e4ff5562ae0bb2ee43e89e3a9d29a362da5a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,17 @@
-2009-01-27 15:25 +0100  Rocco Rutte  <pdmef@gmx.net>  (eb918af802ec)
+2009-01-27 18:48 +0100  Rocco Rutte  <pdmef@gmx.net>  (d7e44862a08a)
+
+       * help.c, main.c, mh.c: Update copyright years
+
+       * help.c: Fix help alignment for escape sequences at screen
+       boundary. Closes #3146.
 
        * mh.c: Unconditionally inode-sort Maildir and MH folders. Closes
        #3166.
 
 2009-01-26 12:32 -0800  Brendan Cully  <brendan@kublai.com>  (da94a92c3ba0)
 
-       * ChangeLog, bcache.c: Remove old bcache tmpfile before trying to
-       create new one. Closes #3163.
+       * bcache.c: Remove old bcache tmpfile before trying to create new
+       one. Closes #3163.
 
 2009-01-20 12:34 -0800  René Clerc  <rene@clerc.nl>  (2006526d1d26)
 
index e5cb67544c73816e6e78e75e443169e9b2e3cb74..c7b451bd84a37d8250f4a90e4784559e43481b66 100644 (file)
@@ -488,8 +488,11 @@ int imap_open_connection (IMAP_DATA* idata)
 
 void imap_close_connection(IMAP_DATA* idata)
 {
-  mutt_socket_close (idata->conn);
-  idata->state = IMAP_DISCONNECTED;
+  if (idata->state != IMAP_DISCONNECTED)
+  {
+    mutt_socket_close (idata->conn);
+    idata->state = IMAP_DISCONNECTED;
+  }
   idata->seqno = idata->nextcmd = idata->lastcmd = idata->status = 0;
   memset (idata->cmds, 0, sizeof (IMAP_COMMAND) * idata->cmdslots);
 }