diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-03-06 20:31:53 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-03-06 20:31:53 +0000 |
commit | 5c89413b245f523478bf5e50d25eb84ecb3fddce (patch) | |
tree | 5d8e5edae61d06be0eb01562989f4f790ef812bf /lib | |
parent | 37f3fcd631a90eb60dc3bc9b70682270fc53e8a7 (diff) |
imap: Tidied up the APPEND and final APPEND response functions
Removed unnecessary state changes on failure and setting of result codes
on success.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/imap.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/imap.c b/lib/imap.c index 894d044e4..186ff63f6 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1506,14 +1506,15 @@ static CURLcode imap_state_append_resp(struct connectdata *conn, int imapcode, result = CURLE_UPLOAD_FAILED; } else { + /* Set the progress upload size */ Curl_pgrsSetUploadSize(data, data->set.infilesize); /* IMAP upload */ Curl_setup_transfer(conn, -1, -1, FALSE, NULL, FIRSTSOCKET, NULL); - } - /* End of DO phase */ - state(conn, IMAP_STOP); + /* End of DO phase */ + state(conn, IMAP_STOP); + } return result; } @@ -1527,14 +1528,11 @@ static CURLcode imap_state_append_final_resp(struct connectdata *conn, (void)instate; /* No use for this yet */ - /* Final response, stop and return the final status */ - if(imapcode == 'O') - result = CURLE_OK; - else + if(imapcode != 'O') result = CURLE_UPLOAD_FAILED; - - /* End of DONE phase */ - state(conn, IMAP_STOP); + else + /* End of DONE phase */ + state(conn, IMAP_STOP); return result; } |