cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: patches: ares non blocking connect, libcurl ares sync resolve timeout [small correction and an addon]

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 2 Feb 2004 17:04:43 +0100 (CET)

On Mon, 2 Feb 2004, Dirk Manske wrote:

> Today I found a bug in my patch (and your commitment). Besides the connect
> also ares_process can time out, than status is set to ARES_ETIMEOUT. So in
> Curl_wait_for_resolv the line

> if(timedout) {
> should be changed to
> if( timeouted || conn->async.status == ARES_ETIMEOUT ) {

Aha! Nice catch. This is indeed explained in the man page. I guess reading
them more carefully is a good idea! ;-)

> And it would be nice to get more information if resolve failes. Is can
> easily done in the following else block.

> char **dummy;
> failf(data, "Could not resolve host: %s cause: %s", conn->name,
> ares_strerror(conn->async.status,dummy) );

I can only agree and apply!

> The dummy variable is needed but unused. Maybe it should be removed from
> ares_strerror.

Yes. Let's do that! We are now officially using c-ares! I'll have a 1.0
release done before the next curl release gets out.

> BTW error message, I have found three different expressions for "time out":
> >grep failf.*time *c

[snip]

Uh yes, that looks slightly bad. I'll see if I get time to sort out a few of
them.

> And error messages while using http proxy are misleading. "Could not resolve
> host" and "Could not connect" can apear for the proxy and the web host. I
> hope I find the time to fix it this week.

I'm not following you here. How are they misleading?

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-02-02