curl-library
Re: Re: ares again
Date: Mon, 13 Oct 2003 14:18:19 +0200 (CEST)
On Mon, 13 Oct 2003, Giuseppe Attardi wrote:
> The problem arises because the connection gets freed in Curl_disconnect:
The problem seems to be that the connection is freed twice with
Curl_disconnect(). I think the following patch should make it work better:
diff -u -r1.37 multi.c
--- multi.c 4 Oct 2003 14:50:45 -0000 1.37
+++ multi.c 13 Oct 2003 12:16:11 -0000
@@ -370,6 +370,11 @@
to the WAITCONNECT state */
easy->result = Curl_async_resolved(easy->easy_conn);
+ if(CURLE_OK != easy->result)
+ /* if Curl_async_resolved() returns failure, the connection struct
+ is already freed and gone */
+ easy->easy_conn = NULL; /* no more connection */
+
easy->state = CURLM_STATE_WAITCONNECT;
}
-- Daniel Stenberg -- curl: been grokking URLs since 1998 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.phpReceived on 2003-10-13