diff options
author | Brendan Cully <brendan@kublai.com> | 2005-08-08 03:30:59 +0000 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2005-08-08 03:30:59 +0000 |
commit | a61e5d5b9c031a6777ae89ac1076448271f6f70d (patch) | |
tree | 2a0c5a86969da81dc4190b416668f3e9228441b9 | |
parent | 1a79e5e7c724c17ec627aa64a710bbd8147e1a1e (diff) |
Fix bug just introduced in lsub parsing that could cause mutt to loop indefinitely.
Don't recheck subscriptions at every mailbox change, just the initial connection.
-rw-r--r-- | imap/command.c | 6 | ||||
-rw-r--r-- | imap/imap.c | 4 | ||||
-rw-r--r-- | init.h | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/imap/command.c b/imap/command.c index 20f76cab..71ed859e 100644 --- a/imap/command.c +++ b/imap/command.c @@ -546,8 +546,10 @@ static void cmd_parse_lsub (IMAP_DATA* idata, char* s) { if (!ascii_strncasecmp (s, "\\NoSelect", 9)) return; - if (*s != ')') - s = imap_next_word (s); + while (s < ep && *s != ' ' && *s != ')') + s++; + if (*s == ' ') + s++; } while (s != ep); s = imap_next_word (s); /* delim */ diff --git a/imap/imap.c b/imap/imap.c index d0e849de..968fe723 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -351,6 +351,7 @@ IMAP_DATA* imap_conn_find (const ACCOUNT* account, int flags) CONNECTION* conn; IMAP_DATA* idata; ACCOUNT* creds; + int new = 0; if (!(conn = mutt_conn_find (NULL, account))) return NULL; @@ -392,6 +393,7 @@ IMAP_DATA* imap_conn_find (const ACCOUNT* account, int flags) conn->data = idata; idata->conn = conn; + new = 1; } if (idata->state == IMAP_DISCONNECTED) @@ -410,7 +412,7 @@ IMAP_DATA* imap_conn_find (const ACCOUNT* account, int flags) FREE (&idata->capstr); } - if (idata->state == IMAP_AUTHENTICATED) + if (new && idata->state == IMAP_AUTHENTICATED) { imap_get_delim (idata); if (option (OPTIMAPCHECKSUBSCRIBED)) @@ -1057,7 +1057,7 @@ struct option_t MuttVars[] = { ** \fBDON'T CHANGE THIS SETTING UNLESS YOU ARE REALLY SURE WHAT YOU ARE ** DOING!\fP */ -#if USE_HCACHE +#ifdef USE_HCACHE { "header_cache", DT_PATH, R_NONE, UL &HeaderCache, 0 }, /* ** .pp |