cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl_read_plain and test 160

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 23 Sep 2008 11:02:45 -0700

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;
     }
   }

and allows those tests to pass. However, that doesn't quite seem right
since it ignores any actual errors and not just the EWOULDBLOCK condition.
Also, the new code handles errors returned from Curl_sec_read differently
(the big if(-1==nread) block is gone) which may have also caused a
Kerberos regression.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-09-23