diff options
| author | Steve Holme <steve_holme@hotmail.com> | 2013-03-02 20:35:03 +0000 | 
|---|---|---|
| committer | Steve Holme <steve_holme@hotmail.com> | 2013-03-02 20:35:03 +0000 | 
| commit | ec38ac38c7b10181b70cc1ed582136d8b61ac83d (patch) | |
| tree | d38d1bdf5b3f7514fd64faf937f1433e874e468f /lib | |
| parent | 0f64dd086a3932252be963ff5fa7efc21ba7b2c9 (diff) | |
imap: Changed successful response logic in imap_state_append_resp()
For consistency changed the logic of the imap_state_append_resp()
function to test for an unsucessful continuation response rather than a
succesful one.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/imap.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/imap.c b/lib/imap.c index c34a0578d..263296142 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1395,7 +1395,11 @@ static CURLcode imap_state_append_resp(struct connectdata *conn,    (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); @@ -1404,10 +1408,6 @@ static CURLcode imap_state_append_resp(struct connectdata *conn,      state(conn, IMAP_STOP);      return CURLE_OK;    } -  else { -    state(conn, IMAP_STOP); -    return CURLE_UPLOAD_FAILED; -  }  }  /* For final APPEND responses performed after the upload */  | 
