{
mutt_error (_("Could not negotiate TLS connection"));
mutt_sleep (1);
- goto bail;
+ goto err_close_conn;
}
else
{
err_close_conn:
mutt_socket_close (idata->conn);
+ idata->state = IMAP_DISCONNECTED;
bail:
FREE (&idata->capstr);
return -1;
imap_cmd_start (idata, "LOGOUT");
while (imap_cmd_step (idata) == IMAP_CMD_CONTINUE)
;
+ FREE(& idata->cmd.buf);
+ FREE(& idata);
}
+/*
int imap_close_connection (CONTEXT *ctx)
{
dprint (1, (debugfile, "imap_close_connection(): closing connection\n"));
- /* if the server didn't shut down on us, close the connection gracefully */
if (CTX_DATA->status != IMAP_BYE)
{
mutt_message _("Closing connection to IMAP server...");
CTX_DATA->conn->data = NULL;
return 0;
}
+*/
/* imap_set_flag: append str to flags if we currently have permission
* according to aclbit */
{
if (mutt_bit_isset (idata->rights, aclbit))
if (flag)
- strncat (flags, str, flsize);
+ safe_strcat (flags, flsize, str);
}
/* imap_make_msg_set: make an IMAP4rev1 UID message set out of a set of