mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
- Guilherme Balena Versiani: I noted a strange BUG in Win32 port
(ares_init.c/get_iphlpapi_dns_info() function): when I disable the network by hand or disconnect the network cable in Windows 2000 or Windows XP, my application gets 127.0.0.1 as the only name server. The problem comes from 'GetNetworkParams' function, that returns the empty string "" as the only name server in that case. Moreover, the Windows implementation of inet_addr() returns INADDR_LOOPBACK instead of INADDR_NONE.
This commit is contained in:
parent
29dc39fce1
commit
00ae13f966
10
ares/CHANGES
10
ares/CHANGES
@ -1,5 +1,15 @@
|
|||||||
Changelog for the c-ares project
|
Changelog for the c-ares project
|
||||||
|
|
||||||
|
* September 11 2006
|
||||||
|
|
||||||
|
- Guilherme Balena Versiani: I noted a strange BUG in Win32 port
|
||||||
|
(ares_init.c/get_iphlpapi_dns_info() function): when I disable the network
|
||||||
|
by hand or disconnect the network cable in Windows 2000 or Windows XP, my
|
||||||
|
application gets 127.0.0.1 as the only name server. The problem comes from
|
||||||
|
'GetNetworkParams' function, that returns the empty string "" as the only
|
||||||
|
name server in that case. Moreover, the Windows implementation of
|
||||||
|
inet_addr() returns INADDR_LOOPBACK instead of INADDR_NONE.
|
||||||
|
|
||||||
* August 29 2006
|
* August 29 2006
|
||||||
|
|
||||||
- Brad Spencer did
|
- Brad Spencer did
|
||||||
|
@ -373,7 +373,8 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
|
|||||||
printf ("DNS Servers:\n"
|
printf ("DNS Servers:\n"
|
||||||
" %s (primary)\n", fi->DnsServerList.IpAddress.String);
|
" %s (primary)\n", fi->DnsServerList.IpAddress.String);
|
||||||
}
|
}
|
||||||
if (inet_addr(fi->DnsServerList.IpAddress.String) != INADDR_NONE &&
|
if (strlen(fi->DnsServerList.IpAddress.String) > 0 &&
|
||||||
|
inet_addr(fi->DnsServerList.IpAddress.String) != INADDR_NONE &&
|
||||||
left > ip_size)
|
left > ip_size)
|
||||||
{
|
{
|
||||||
ret += sprintf (ret, "%s,", fi->DnsServerList.IpAddress.String);
|
ret += sprintf (ret, "%s,", fi->DnsServerList.IpAddress.String);
|
||||||
|
Loading…
Reference in New Issue
Block a user