From: Jiri Hruska Date: Thu, 28 Feb 2013 18:56:52 +0000 (+0100) Subject: imap: Fixed error code returned for invalid FETCH response X-Git-Tag: curl-7_30_0~234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=025ba6e9bec2d102c4abfd5a47aa9d9587e9566b;p=curl imap: Fixed error code returned for invalid FETCH response If the FETCH command does not result in an untagged response the the UID is probably invalid. As such do not return CURLE_OK. --- diff --git a/lib/imap.c b/lib/imap.c index a834c4e5f..c1ed8673b 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1271,7 +1271,7 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode, if('*' != imapcode) { Curl_pgrsSetDownloadSize(data, 0); state(conn, IMAP_STOP); - return CURLE_OK; + return CURLE_REMOTE_FILE_NOT_FOUND; /* TODO: Fix error code */ } /* Something like this comes "* 1 FETCH (BODY[TEXT] {2021}\r" */