*/
int imap_cmd_step(struct ImapAccountData *adata)
{
+ if (!adata)
+ return -1;
+
size_t len = 0;
int c;
int rc;
*/
void imap_cmd_finish(struct ImapAccountData *adata)
{
+ if (!adata)
+ return;
+
if (adata->status == IMAP_FATAL)
{
cmd_handle_fatal(adata);
else if (adata->state < IMAP_AUTHENTICATED)
continue;
}
- if (flags & MUTT_IMAP_CONN_NOSELECT && adata && adata->state >= IMAP_SELECTED)
+ if ((flags & MUTT_IMAP_CONN_NOSELECT) && adata && (adata->state >= IMAP_SELECTED))
continue;
- if (adata && adata->status == IMAP_FATAL)
+ if (adata && (adata->status == IMAP_FATAL))
continue;
break;
}
else
mutt_account_unsetpass(&adata->conn->account);
}
- if (new && adata->state == IMAP_AUTHENTICATED)
+ if (new && (adata->state == IMAP_AUTHENTICATED))
{
/* capabilities may have changed */
imap_exec(adata, "CAPABILITY", IMAP_CMD_QUEUE);
*/
int imap_check(struct ImapAccountData *adata, bool force)
{
+ if (!adata)
+ return -1;
+
/* overload keyboard timeout to avoid many mailbox checks in a row.
* Most users don't like having to wait exactly when they press a key. */
int result = 0;
continue;
}
- if (lastdata && adata != lastdata)
+ if (lastdata && (adata != lastdata))
{
/* Send commands to previous server. Sorting the mailbox list
* may prevent some infelicitous interleavings */