X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fcommand.c;h=c33776bc6167eeaa60f25e04c21ab8a7bf64d0a4;hb=132d06d5920f9a496a8623acfbbabe9739618489;hp=8b937128fbbac2be7080cd4b4a631ebef13dc4db;hpb=16536d59024177409f49134c3f03f69855c144b9;p=apps%2Fmadmutt.git diff --git a/imap/command.c b/imap/command.c index 8b93712..c33776b 100644 --- a/imap/command.c +++ b/imap/command.c @@ -13,10 +13,11 @@ * responses */ #include +#include #include "mutt.h" +#include "buffy.h" #include "message.h" -#include "mx.h" #include "imap_private.h" #include @@ -209,16 +210,6 @@ int imap_exec (IMAP_DATA * idata, const char *cmd, int flags) return 0; } -/* imap_cmd_running: Returns whether an IMAP command is in progress. */ -int imap_cmd_running (IMAP_DATA * idata) -{ - if (idata->cmd.state == IMAP_CMD_CONTINUE || - idata->cmd.state == IMAP_CMD_RESPOND) - return 1; - - return 0; -} - /* imap_cmd_finish: Attempts to perform cleanup (eg fetch new mail if * detected, do expunge). Called automatically by imap_cmd_step, but * may be called at any time. Called by imap_check_mailbox just before @@ -495,8 +486,6 @@ static void cmd_parse_fetch (IMAP_DATA * idata, char *s) static void cmd_parse_lsub (IMAP_DATA* idata, char* s) { char buf[STRING]; - char errstr[STRING]; - BUFFER err, token; ciss_url_t url; char *ep; @@ -527,18 +516,12 @@ static void cmd_parse_lsub (IMAP_DATA* idata, char* s) { if (s) { imap_unmunge_mbox_name (s); - m_strcpy(buf, sizeof(buf), "mailboxes \""); - mutt_account_tourl (&idata->conn->account, &url); + mutt_account_tourl(&idata->conn->account, &url); url.path = s; if (!m_strcmp(url.user, ImapUser)) url.user = NULL; - url_ciss_tostring (&url, buf + 11, sizeof (buf) - 10, 0); - m_strcat(buf, sizeof(buf), "\""); - p_clear(&token, 1); - err.data = errstr; - err.dsize = sizeof (errstr); - mutt_parse_rc_line (buf, &token, &err); - p_delete(&token.data); + url_ciss_tostring(&url, buf, sizeof(buf), 0); + buffy_do_mailboxes(buf, 1); } }