cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] modular I/O

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 7 May 2010 00:08:56 +0200 (CEST)

On Thu, 6 May 2010, Howard Chu wrote:

I really like the spirit of this patch. It makes a lot of sense to me as it
moves the send/recv functions out to the code that deal with the particular
protocols.

I'm posting my updated version of your work here mostly because I'm heading
off to bed now and it's not quite working yet.

The one current flaw I've found I believe is this:

   Curl_read() calls conn->recv() and if that returns -1, Curl_read() returns
   the curlcode.

   This is bad since Curl_read() used to return -1 for EAGAIN cases and now it
   returns CURLE_AGAIN instead so for example lib/pingpong.c:Curl_pp_readresp()
   doesn't treat the return code from Curl_read() correctly.

It should be fairly easy to fix and I'll give it another shot tomorrow unless
someone else gets there first.

The full diffstat for this patch is now:

  lib/gtls.c | 23 +++++++-----
  lib/gtls.h | 10 -----
  lib/krb4.h | 5 +--
  lib/nss.c | 31 +++++++++--------
  lib/nssg.h | 16 ---------
  lib/polarssl.c | 33 ++++++++++--------
  lib/polarssl.h | 10 -----
  lib/qssl.c | 26 ++++++++------
  lib/qssl.h | 16 ---------
  lib/security.c | 102 +++++++++++++++----------------------------------------
  lib/sendf.c | 103 +++++++++-----------------------------------------------
  lib/ssh.c | 46 ++++++++++++++++++------
  lib/ssh.h | 20 -----------
  lib/sslgen.c | 19 ----------
  lib/sslgen.h | 22 ------------
  lib/ssluse.c | 31 +++++++++--------
  lib/ssluse.h | 16 ---------
  lib/url.c | 72 +++++++++++++++++++++++++++++++++++++++
  lib/urldata.h | 17 +++++++++
  19 files changed, 248 insertions(+), 370 deletions(-)

-- 
  / daniel.haxx.se


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-05-07