From: Brendan Cully Date: Tue, 6 Sep 2005 00:45:28 +0000 (+0000) Subject: Move SASL and IMAP shutdown hooks into main where they belong. X-Git-Tag: mutt-1-5-11-rel~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=394c271817b185edc165662686b86546ecd08689;p=mutt Move SASL and IMAP shutdown hooks into main where they belong. --- diff --git a/curs_main.c b/curs_main.c index 0e7b44ca..1454f3b4 100644 --- a/curs_main.c +++ b/curs_main.c @@ -38,10 +38,6 @@ #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 c5d1b956..b6d46f67 100644 --- a/main.c +++ b/main.c @@ -32,6 +32,14 @@ #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 #include #include @@ -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); }