Subject: Patch for fixing the slow DNS lookup issue

Patch for fixing the slow DNS lookup issue

From: Lei Shi <cosmo.shih_at_gmail.com>
Date: Thu, 22 May 2014 13:43:53 +0800

Hello, everyone

This patch include two major change groups. one is fixing the dns lookup
issue due to dummy dns information of a disconnected adapter(in my case is
a bluetooth adapter). I changed the dns lookup policy to try
GetNetworkParams first because the GetNetworkParams provides the most
reliable dns information(lots of checks were done by system).
I also filter out inoperable adapter in DNS_AdaptersAddresses in case
GetNetworkParams fail.
the other is explicit invoke ANSI version Win32 API in case compile c-ares
in unicode environment.

Best Wishes
Lei Shi.

Received on 2014-05-22