1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

imap: Moved imap_logout() to be grouped with the other perform functions

This commit is contained in:
Steve Holme 2013-03-09 12:12:20 +00:00
parent b482417ac4
commit b4c9b515aa

View File

@ -821,6 +821,25 @@ static CURLcode imap_custom(struct connectdata *conn)
return result; return result;
} }
/***********************************************************************
*
* imap_logout()
*
* Performs the logout action prior to sclose() being called.
*/
static CURLcode imap_logout(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
/* Send the LOGOUT command */
result = imap_sendf(conn, "LOGOUT");
if(!result)
state(conn, IMAP_LOGOUT);
return result;
}
/* For the initial server greeting */ /* For the initial server greeting */
static CURLcode imap_state_servergreet_resp(struct connectdata *conn, static CURLcode imap_state_servergreet_resp(struct connectdata *conn,
int imapcode, int imapcode,
@ -1936,25 +1955,6 @@ static CURLcode imap_do(struct connectdata *conn, bool *done)
return result; return result;
} }
/***********************************************************************
*
* imap_logout()
*
* Performs the logout action prior to sclose() being called.
*/
static CURLcode imap_logout(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
/* Send the LOGOUT command */
result = imap_sendf(conn, "LOGOUT");
if(!result)
state(conn, IMAP_LOGOUT);
return result;
}
/*********************************************************************** /***********************************************************************
* *
* imap_disconnect() * imap_disconnect()