X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fcommand.c;h=bf21c4bf5b10bd1ac7d2682e6fae9cee55fc086b;hp=5caaee9485eb09ab01434fec6ea04ba319a7db05;hb=bc45345ba77e08ee3dc159ba0e04bc654f191cd3;hpb=23e6291cb5d5b4cd2008403d8b628007fd75ff23 diff --git a/imap/command.c b/imap/command.c index 5caaee9..bf21c4b 100644 --- a/imap/command.c +++ b/imap/command.c @@ -12,17 +12,11 @@ /* command.c: routines for sending commands to an IMAP server and parsing * responses */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include +#include #include "mutt.h" #include "message.h" -#include "mx.h" #include "imap_private.h" #include @@ -131,7 +125,7 @@ int imap_cmd_step (IMAP_DATA * idata) idata->lastread = time (NULL); /* handle untagged messages. The caller still gets its shot afterwards. */ - if (!ascii_strncmp (cmd->buf, "* ", 2) && cmd_handle_untagged (idata)) + if (!m_strncmp(cmd->buf, "* ", 2) && cmd_handle_untagged (idata)) return IMAP_CMD_BAD; /* server demands a continuation response from us */ @@ -139,7 +133,7 @@ int imap_cmd_step (IMAP_DATA * idata) return IMAP_CMD_RESPOND; /* tagged completion code */ - if (!ascii_strncmp (cmd->buf, cmd->seq, SEQLEN)) { + if (!m_strncmp(cmd->buf, cmd->seq, SEQLEN)) { imap_cmd_finish (idata); return imap_code (cmd->buf) ? IMAP_CMD_OK : IMAP_CMD_NO; } @@ -186,9 +180,7 @@ int imap_exec (IMAP_DATA * idata, const char *cmd, int flags) out = p_new(char, outlen); snprintf (out, outlen, "%s %s\r\n", idata->cmd.seq, cmd); - rc = mutt_socket_write_d (idata->conn, out, - flags & IMAP_CMD_PASS ? IMAP_LOG_PASS : - IMAP_LOG_CMD); + rc = mutt_socket_write(idata->conn, out); p_delete(&out); if (rc < 0) { @@ -217,16 +209,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