cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl_read_plain and test 160

From: Tor Arntsen <tor_at_spacetec.no>
Date: Wed, 24 Sep 2008 14:50:25 +0200

On Tue, Sep 23, 2008 at 20:02, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> It's not just test 160, but tests 64, 69, 90 and 153 on several of my
> autobuilds that are now failing since this change went in (e.g.
> http://curl.haxx.se/auto/log.cgi?id=20080923094436-27242). The reason
> is because of differences in error handling with Curl_read_plain. This
> patch makes it closer to how it used to be:
>
> diff -u -r1.148 sendf.c
> --- lib/sendf.c 22 Sep 2008 23:12:09 -0000 1.148
> +++ lib/sendf.c 23 Sep 2008 17:55:48 -0000
> @@ -640,7 +640,7 @@
> else {
> CURLcode ret = Curl_read_plain(sockfd, buffertofill, bytesfromsocket,
> &nread);
> - if(ret)
> + if(ret < 0)
> return ret;
> }
> }
[...]

A negative value isn't even a valid Curlcode.. Curl_read_plain() can
return -1 now, but it's supposed to return only Curlcode values so we
currently get these kind of build warnings:
http://curl.haxx.se/auto/log.cgi?id=20080924053141-11635#prob1

-Tor
Received on 2008-09-24