Subject: Re: Resolving names without dns-suffix on windows

Re: Resolving names without dns-suffix on windows

From: René Berber <r.berber_at_computer.org>
Date: Tue, 25 Jun 2013 16:06:25 -0500

On 6/25/2013 3:37 PM, Daniel Stenberg wrote:

> On Tue, 25 Jun 2013, Maxim Ruban wrote:
>
>> Patch is in attach (pl. let me know if something wrong with it - I've
>> made it by TortoiseCVS on Windows, and don't know if it's compatible
>> with Unix-family tools).
>>
>> Please, review it and improve if neccessary.
>
> I'm very interested in "+1"s or other expressions of acknowledgements as
> I'm a Windows illiterate and I need help to tell a good fix from
> something that needs improvements.
>
> Given some support on this list, I don't mind to merge and push.

The code uses a goto, which is a no-no if I remember correctly.

I haven't had time to research if reading the Windows registry is
necessary at all, what comes to mind is: what if the existing calls to
get_DNS_Windows(), get_DNS_NetworkParams(), and
get_DNS_AdaptersAddresses() are already doing that (and how else would
they do their work).

As pointed out by Maxim, there are several issues here, (1) resolving
simple names (i.e. with no domain), my patch solves that; (2) getting
all the domains (i.e. from all active network interfaces).

I think we need a good test case, or several.

-- 
René Berber
Received on 2013-06-26