aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-03-06 20:10:53 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-03-06 20:10:53 +0000
commitc9f9f601b828e0121d4e10b532789c704c8c0716 (patch)
tree08e2324291264c9878ea709e560bd368633a42cd /lib
parent24ffceed81d120b1942e39938e48a73c5fda6848 (diff)
imap: Tidied up the LIST response function
Reworked comments as they referenced custom commands, removed unnecessary state change on failure and setting of result code on success.
Diffstat (limited to 'lib')
-rw-r--r--lib/imap.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 90a2eb328..3130e1abb 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1323,23 +1323,16 @@ static CURLcode imap_state_list_resp(struct connectdata *conn, int imapcode,
(void)instate; /* No use for this yet */
if(imapcode == '*') {
- /* The client which asked for this custom command should know best
- how to cope with the result, just send it as body.
- Add back the LF character temporarily while saving. */
+ /* Temporarily add the LF character back and send as body to the client */
line[len] = '\n';
result = Curl_client_write(conn, CLIENTWRITE_BODY, line, len + 1);
line[len] = '\0';
}
- else {
- /* Final response. Stop and return the final status. */
- if(imapcode != 'O')
- result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */
- else
- result = CURLE_OK;
-
+ else if(imapcode != 'O')
+ result = CURLE_QUOTE_ERROR; /* TODO: Fix error code */
+ else
/* End of DO phase */
state(conn, IMAP_STOP);
- }
return result;
}