For consistency changed the logic of the imap_state_append_resp()
function to test for an unsucessful continuation response rather than a
succesful one.
(void)instate; /* No use for this yet */
- if(imapcode == '+') {
+ if(imapcode != '+') {
+ state(conn, IMAP_STOP);
+ return CURLE_UPLOAD_FAILED;
+ }
+ else {
Curl_pgrsSetUploadSize(data, data->set.infilesize);
Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* No download */
FIRSTSOCKET, NULL);
state(conn, IMAP_STOP);
return CURLE_OK;
}
- else {
- state(conn, IMAP_STOP);
- return CURLE_UPLOAD_FAILED;
- }
}
/* For final APPEND responses performed after the upload */