Subject: Re: file_lookup errors and next_lookup behavior

Re: file_lookup errors and next_lookup behavior

From: Erik Kline <ek_at_google.com>
Date: Wed, 28 Nov 2007 03:34:52 -0800

On 28/11/2007, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Tue, 27 Nov 2007, Erik Kline wrote:
>
> > I think it'd probably be nice to continue trying to resolve the name/addr in
> > the face of any file_lookup failures. Thoughts?
>
> I completely agree!
>
> > [2] Change that conditional in next_lookup() from "if (status !=
> > ARES_ENOTFOUND)" to the more explicit "if (status == ARES_SUCCESS)". I think
> > this may be more desirable.
>
> Seems like the correct fix indeed. I also consider it bad practise to check
> for "not a specific single explicit error code" like that. It just begs for
> weird errors in the future when/if we add greater error code granularity...
>
> Fix committed just now. Great catch!

Thanks for making the change so quickly. May I ask about
ares_gethostbyaddr() as well? It seems to have similar (legacy)
logic.

> --
> c-ares -- my preferred DNS asynch resolver library
>
Received on 2007-11-28