cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_init with c-ares, but without nameservers?

From: Andreas Rieke <andreas.rieke_at_isl.de>
Date: Sun, 07 Nov 2004 12:46:21 +0100

Hi,

I am using cURL (7.12.2) with c-ares (1.2.1) for an application where I
need asynchronous communication under linux and windows.
The application works fine in the "normal" environment where nameservers
are defined and available; however, it should also be able to work on
machines where no nameservers are defined. It is obvious that only the
numeric representation of IP addresses works in the latter case.

When using cURL with c-ares, curl_easy_init returns NULL in my
environment without nameservers, and as far as I can see, this is
because ares_init is called from within curl_easy_init. I assume that
ares_init is not able to find any nameservers and thus refuses working.

In previous versions of my application where I used cURL without c-ares,
there have been no initialization problems for curl_easy_init even if no
nameservers were defined. Is there any way to get cURL running with
c-ares even if no nameservers are defined?

Thanks in advance,

Andreas

P.S.: I do know that it does not really make sense to run an
asynchronous name resolver without nameservers, but when writing an
application, I would like that it runs in any environment, even if no
nameservers are defined.
Received on 2004-11-07