cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: round robin DNS without Ares only takes first IP

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 25 Apr 2005 13:45:00 +0200 (CEST)

On Mon, 25 Apr 2005, A Nonymous wrote:

> The following is an excerpt of hostip.c
> Would you find it appropriate to check an option set in the session data and
> randomize the entryies before assigning them in
> dns->addr = addr; /* this is the address(es) */

No, that's the place that stores the data in the cache.

The right place would probably be in Curl_resolv() when a cached content is
used and while the cache is locked and only if the returned address isn't in
use by someone else (the ->inuse counter hints about that).

-- 
   Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-04-25