Subject: Re: [Patch] Add ares_gethostbyname_files() function

Re: [Patch] Add ares_gethostbyname_files() function

From: Yang Tse <yangsita_at_gmail.com>
Date: Wed, 19 Nov 2008 12:14:29 +0100

Hi Brad,

2008/11/19, Brad Spencer wrote:

> [...] I suspect that most of the
> functionality that resiprocate actually needs is already in c-ares
> (but that hasn't been determined yet).

It would be interesting to know the changes to c-ares that this
requires, specially external API ones, as this would help in making a
decision on both sides and avoid making only half of the required
changes to later discover that the other half cannot be applied to
c-ares.

> [...]
> This patch adds the ares_gethostbyname_file() function, which does the
> local (non-asynchronous, non-blocking) lookup described above.
> [...]

Well, what it does is move to the external API and document the
internal file lookup _blocking_ method.

I know that the fact that the internal file lookup method is blocking
is a c-ares issue. But before applying your patch this was something
that someone might someday fix to allow asynchronous lookups and not
get blocked when using a 600 kb hosts file.

If the above is someday fixed and this patch has been applied the
blocking functionality of the new ares_gethostbyname_file() would have
to be kept around.

Besides the above comments the patch looks good and won't disturb
existing functionality.

I have no preferences towards accepting or rejecting the patch, so
I'll leave that for Daniel ;-)

-- 
-=[Yang]=-
Received on 2008-11-19