1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

imap: Simplified the imap_state_append_resp() function

Introduced the result code variable to simplify the state changes and
remove the hard returns.
This commit is contained in:
Steve Holme 2013-03-02 20:40:38 +00:00
parent ec38ac38c7
commit e94fbcabd7

View File

@ -1391,23 +1391,23 @@ static CURLcode imap_state_append_resp(struct connectdata *conn,
int imapcode, int imapcode,
imapstate instate) imapstate instate)
{ {
CURLcode result = CURLE_OK;
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
(void)instate; /* No use for this yet */ (void)instate; /* No use for this yet */
if(imapcode != '+') { if(imapcode != '+') {
state(conn, IMAP_STOP); result = CURLE_UPLOAD_FAILED;
return CURLE_UPLOAD_FAILED;
} }
else { else {
Curl_pgrsSetUploadSize(data, data->set.infilesize); Curl_pgrsSetUploadSize(data, data->set.infilesize);
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* No download */ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* No download */
FIRSTSOCKET, NULL); FIRSTSOCKET, NULL);
/* Stop now and let the core go from DO to PERFORM phase */
state(conn, IMAP_STOP);
return CURLE_OK;
} }
state(conn, IMAP_STOP);
return result;
} }
/* For final APPEND responses performed after the upload */ /* For final APPEND responses performed after the upload */