From: Daniel Stenberg Date: Wed, 21 Nov 2007 22:37:55 +0000 (+0000) Subject: Make the do_complete() function not get called until the DO actually is X-Git-Tag: curl-7_18_0~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb04619de25c2aa03505ccedb8ad76dd39137ee5;p=thirdparty%2Fcurl.git Make the do_complete() function not get called until the DO actually is compelete, which bascially means when used with the multi interface --- diff --git a/lib/url.c b/lib/url.c index 7fee3daffa..0415d519b5 100644 --- a/lib/url.c +++ b/lib/url.c @@ -4575,8 +4575,8 @@ CURLcode Curl_do(struct connectdata **connp, bool *done) } } - if(result == CURLE_OK) - /* pre readwrite must be called after the protocol-specific DO function */ + if((result == CURLE_OK) && *done) + /* do_complete must be called after the protocol-specific DO function */ do_complete(conn); } return result; @@ -4589,6 +4589,10 @@ CURLcode Curl_do_more(struct connectdata *conn) if(conn->handler->do_more) result = conn->handler->do_more(conn); + if(result == CURLE_OK) + /* do_complete must be called after the protocol-specific DO function */ + do_complete(conn); + return result; }