Hi Kevin! On Mi, 19 Aug 2015, Kevin J. McCarthy wrote:
> We're now getting ready for a new release. I've contacted the > translators and asked them to update translations. Accordingly, updates > at this point should be bug-fixes only, to minimize disruption to their > translation process. > > If you haven't tried a recent version from hg, now would be a great time > to update and try compiling and testing mutt. (Make sure you are on the > default branch). > Please let us know if you find any issues. Thank you! Great news. I took the chance and built mutt for the first time in several years. Some remarks: 1) Unfortunately, I run into a problem immediately, because I am using IMAPS, but mutt was compiled without ssl support. Okay, this was easy enough to fix using --with-gnutls, but I thought I mention anyhow, that a missing ssl support spits my terminal full of messages: SSL not available SSL not available SSL not available ... and it is impossible to abort, until mutt has finished parsing the config file which seems to be delayed by those error messages. So it takes forever until I was able to close mutt. So attached is a small patch, to abort earlier. It still prints those messages like 4 times on my system, which is because it now checks twice in mutt_parse_mailbox() and in imap_expand_path() whether an ssl connection is possible, but at least it returns a lot earlier and allows to quit. The actual problem is, mutt_expand_path does not return an error indication to the caller, so mutt will happily try as often as your config file contains some imap specific stuff to connect to your imap server. I thought about changing mutt_expand_path, but that seems too invasive, so I made this dirty patch. 2) I don't know for how long we have been running mutt with the trash folder patch. It looks quite clean to me. So would you consider integrating this patch upstream? regards, Christian -- <jgoerzen> doogie: you sound highly unstable :-) <Knghtbrd> jgoerzen - he is. * doogie bops Knghtbrd <Knghtbrd> see? Resorting to violence =D
diff --git a/buffy.c b/buffy.c --- a/buffy.c +++ b/buffy.c @@ -235,6 +235,11 @@ int mutt_parse_mailboxes (BUFFER *path, } mutt_expand_path (buf, sizeof (buf)); +#ifdef USE_IMAP + /* e.g. in case of ssl error, return an error here */ + if (mx_is_imap (buf) && imap_expand_path (buf, sizeof (buf)) < 0) + return -1; +#endif /* Skip empty tokens. */ if(!*buf) continue; diff --git a/imap/util.c b/imap/util.c --- a/imap/util.c +++ b/imap/util.c @@ -62,6 +62,8 @@ int imap_expand_path (char* path, size_t return -1; idata = imap_conn_find (&mx.account, M_IMAP_CONN_NONEW); + if (idata == NULL) + return -1; mutt_account_tourl (&mx.account, &url); imap_fix_path (idata, mx.mbox, fixedpath, sizeof (fixedpath)); url.path = fixedpath; diff --git a/init.c b/init.c --- a/init.c +++ b/init.c @@ -37,7 +37,9 @@ #include "mutt_ssl.h" #endif - +#ifdef USE_IMAP +#include "imap.h" +#endif #include "mx.h" #include "init.h" @@ -1901,6 +1903,11 @@ static int parse_set (BUFFER *tmp, BUFFE strfcpy (scratch, tmp->data, sizeof (scratch)); mutt_expand_path (scratch, sizeof (scratch)); +#ifdef USE_IMAP + /* e.g. in case of ssl error, return an error here */ + if (mx_is_imap (scratch) && imap_expand_path (scratch, sizeof (scratch)) < 0) + return -1; +#endif *((char **) MuttVars[idx].data) = safe_strdup (scratch); } else if (DTYPE (MuttVars[idx].type) == DT_STR)