email: Additional tidy up of comments following recent changes

This commit is contained in:
Steve Holme
2013-02-23 20:02:05 +00:00
parent 0b795db731
commit 7f6c7331b2
3 changed files with 33 additions and 39 deletions

View File

@@ -538,7 +538,7 @@ static CURLcode imap_state_login(struct connectdata *conn)
user = imap_atom(conn->user);
passwd = imap_atom(conn->passwd);
/* Send USER and password */
/* Send the LOGIN command */
result = imap_sendf(conn, "LOGIN %s %s", user ? user : "",
passwd ? passwd : "");
@@ -1460,11 +1460,10 @@ static CURLcode imap_done(struct connectdata *conn, CURLcode status,
(void)premature;
if(!imap)
/* When the easy handle is removed from the multi while libcurl is still
* trying to resolve the host name, it seems that the IMAP struct is not
* yet initialized, but the removal action calls Curl_done() which calls
* this function. So we simply return success if no IMAP pointer is set.
*/
/* When the easy handle is removed from the multi interface while libcurl
is still trying to resolve the host name, the IMAP struct is not yet
initialized. However, the removal action calls Curl_done() which in
turn calls this function, so we simply return success. */
return CURLE_OK;
if(status) {
@@ -1512,7 +1511,7 @@ static CURLcode imap_perform(struct connectdata *conn, bool *connected,
if(result)
return result;
/* run the state-machine */
/* Run the state-machine */
result = imap_multi_statemach(conn, dophase_done);
*connected = conn->bits.tcpconnect[FIRSTSOCKET];
@@ -1538,12 +1537,10 @@ static CURLcode imap_do(struct connectdata *conn, bool *done)
*done = FALSE; /* default to false */
/*
Since connections can be re-used between SessionHandles, this might be a
connection already existing but on a fresh SessionHandle struct so we must
make sure we have a good 'struct IMAP' to play with. For new connections,
the struct IMAP is allocated and setup in the imap_connect() function.
*/
/* Since connections can be re-used between SessionHandles, there might be a
connection already existing but on a fresh SessionHandle struct. As such
we make sure we have a good IMAP struct to play with. For new connections
the IMAP struct is allocated and setup in the imap_connect() function. */
Curl_reset_reqproto(conn);
result = imap_init(conn);
if(result)
@@ -1572,6 +1569,7 @@ static CURLcode imap_logout(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
/* Send the LOGOUT command */
result = imap_sendf(conn, "LOGOUT", NULL);
if(result)
return result;
@@ -1596,7 +1594,7 @@ static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection)
/* We cannot send quit unconditionally. If this connection is stale or
bad in any way, sending quit and waiting around here will make the
disconnect wait in vain and cause more problems than we need to */
disconnect wait in vain and cause more problems than we need to. */
/* The IMAP session may or may not have been allocated/setup at this
point! */