/* sets up a new command control block and adds it to the queue.
* Returns NULL if the pipeline is full. */
-static IMAP_COMMAND *cmd_new(IMAP_DATA *idata)
+static struct ImapCommand *cmd_new(IMAP_DATA *idata)
{
- IMAP_COMMAND *cmd = NULL;
+ struct ImapCommand *cmd = NULL;
if (cmd_queue_full(idata))
{
/* queues command. If the queue is full, attempts to drain it. */
static int cmd_queue(IMAP_DATA *idata, const char *cmdstr)
{
- IMAP_COMMAND *cmd = NULL;
+ struct ImapCommand *cmd = NULL;
int rc;
if (cmd_queue_full(idata))
int c;
int rc;
int stillrunning = 0;
- IMAP_COMMAND *cmd = NULL;
+ struct ImapCommand *cmd = NULL;
if (idata->status == IMAP_FATAL)
{
idata->state = IMAP_DISCONNECTED;
}
idata->seqno = idata->nextcmd = idata->lastcmd = idata->status = false;
- memset(idata->cmds, 0, sizeof(IMAP_COMMAND) * idata->cmdslots);
+ memset(idata->cmds, 0, sizeof(struct ImapCommand) * idata->cmdslots);
}
/* imap_get_flags: Make a simple list out of a FLAGS response.
#define IMAP_LOG_LTRL 4
#define IMAP_LOG_PASS 5
-/* IMAP command responses. Used in IMAP_COMMAND.state too */
+/* IMAP command responses. Used in ImapCommand.state too */
/* <tag> OK ... */
#define IMAP_CMD_OK (0)
/* <tag> BAD ... */
#define IMAP_CMD_CONTINUE (1)
/* + */
#define IMAP_CMD_RESPOND (2)
-/* IMAP_COMMAND.state additions */
+/* ImapCommand.state additions */
#define IMAP_CMD_NEW (3)
/* number of entries in the hash table */
} IMAP_LIST;
/* IMAP command structure */
-typedef struct
+struct ImapCommand
{
char seq[SEQLEN + 1];
int state;
-} IMAP_COMMAND;
+};
typedef enum {
IMAP_CT_NONE = 0,
void *cmddata;
/* command queue */
- IMAP_COMMAND *cmds;
+ struct ImapCommand *cmds;
int cmdslots;
int nextcmd;
int lastcmd;