From e0c335cfd4a9cef904a5553c3273771f9b7efe54 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Tue, 6 Sep 2005 00:45:28 +0000 Subject: [PATCH] Move SASL and IMAP shutdown hooks into main where they belong. --- curs_main.c | 15 --------------- main.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/curs_main.c b/curs_main.c index 0e7b44ca5..1454f3b4d 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 c5d1b956e..b6d46f677 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); } -- 2.40.0