X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Futil.c;h=fa54de662aa7e5c6c3f7496e7faf67086e148fa0;hp=ecf5d536ca174f3c7ac18d670cd0a541db27f2e1;hb=ea912b20ba2b3b9dfdbbae758ad56263c9aa41b3;hpb=ba5e3af4ea19e1d20c80941c077039871ec84258 diff --git a/imap/util.c b/imap/util.c index ecf5d53..fa54de6 100644 --- a/imap/util.c +++ b/imap/util.c @@ -15,6 +15,7 @@ #include "mutt.h" #include "mx.h" /* for M_IMAP */ +#include "ascii.h" #include "url.h" #include "imap_private.h" #include "mutt_ssl.h" @@ -98,7 +99,7 @@ int imap_parse_path (const char *path, IMAP_MBOX * mx) url_parse_ciss (&url, c); if (!(url.scheme == U_IMAP || url.scheme == U_IMAPS) || - mutt_account_fromurl (&mx->account, &url) < 0) { + mutt_account_fromurl (&mx->account, &url) < 0 || !*mx->account.host) { mem_free (&c); return -1; } @@ -515,9 +516,11 @@ int imap_wait_keepalive (pid_t pid) int rc; short imap_passive = option (OPTIMAPPASSIVE); + int imap_askreconnect = quadoption (OPT_IMAPRECONNECT); set_option (OPTIMAPPASSIVE); set_option (OPTKEEPQUIET); + set_quadoption (OPT_IMAPRECONNECT, M_NO); sigprocmask (SIG_SETMASK, NULL, &oldmask); @@ -546,6 +549,7 @@ int imap_wait_keepalive (pid_t pid) unset_option (OPTKEEPQUIET); if (!imap_passive) unset_option (OPTIMAPPASSIVE); + set_quadoption (OPT_IMAPRECONNECT, imap_askreconnect); return rc; }