(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;
}