]> granicus.if.org Git - mutt/commitdiff
Move SASL and IMAP shutdown hooks into main where they belong.
authorBrendan Cully <brendan@kublai.com>
Tue, 6 Sep 2005 00:45:28 +0000 (00:45 +0000)
committerBrendan Cully <brendan@kublai.com>
Tue, 6 Sep 2005 00:45:28 +0000 (00:45 +0000)
curs_main.c
main.c

index 0e7b44ca598ea3e94293ffb88879b71424bdb433..1454f3b4d862b8c64b38bbb37d6a652ced86ac6a 100644 (file)
 #include "imap_private.h"
 #endif
 
-#ifdef USE_SASL
-#include "mutt_sasl.h"
-#endif
-
 #include "mutt_crypt.h"
 
 
@@ -2199,17 +2195,6 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE);
     if (done) break;
   }
 
-  if (!attach_msg)
-  {
-#ifdef USE_IMAP
-  /* Close all open IMAP connections */
-    imap_logout_all ();
-#endif
-#ifdef USE_SASL
-    mutt_sasl_done ();
-#endif
-  }
-
   mutt_menuDestroy (&menu);
   return (close);
 }
diff --git a/main.c b/main.c
index c5d1b956eca2b2cd064f4d74d7d73bf22e6bcbb6..b6d46f677fd0f32cd30efda0549be2da1bcb32e7 100644 (file)
--- a/main.c
+++ b/main.c
 #include "mutt_crypt.h"
 #include "mutt_idna.h"
 
+#ifdef USE_SASL
+#include "mutt_sasl.h"
+#endif
+
+#ifdef USE_IMAP
+#include "imap/imap.h"
+#endif
+
 #include <string.h>
 #include <stdlib.h>
 #include <locale.h>
@@ -944,6 +952,12 @@ int main (int argc, char **argv)
       if (Context)
        FREE (&Context);
     }
+#ifdef USE_IMAP
+    imap_logout_all ();
+#endif
+#ifdef USE_SASL
+    mutt_sasl_done ();
+#endif
     mutt_endwin (Errorbuf);
   }