diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-08-21 21:09:44 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-08-21 21:09:44 +0000 |
commit | a8bb249d075f8587f62ed794ca70bf7a2aecc40d (patch) | |
tree | 5cedd478145d5c1d26728d82c93495dfaf2c86c0 /ares_init.c | |
parent | b117fef9097a6f1a7795f11bd079c315472fa425 (diff) | |
download | c-ares-a8bb249d075f8587f62ed794ca70bf7a2aecc40d.tar.gz c-ares-a8bb249d075f8587f62ed794ca70bf7a2aecc40d.tar.bz2 c-ares-a8bb249d075f8587f62ed794ca70bf7a2aecc40d.zip |
Alfredo Tupone provided a fix for the Windows code in get_iphlpapi_dns_info()
when getting the DNS server etc.
Diffstat (limited to 'ares_init.c')
-rw-r--r-- | ares_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ares_init.c b/ares_init.c index b78c927..f97f701 100644 --- a/ares_init.c +++ b/ares_init.c @@ -327,6 +327,7 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size) size_t ip_size = sizeof("255.255.255.255,")-1; size_t left = ret_size; char *ret = ret_buf; + HRESULT res; if (!fi) return (0); @@ -339,7 +340,8 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size) if (!GetNetworkParams) goto quit; - if ((*GetNetworkParams) (fi, &size) != ERROR_BUFFER_OVERFLOW) + res = (*GetNetworkParams) (fi, &size); + if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS)) goto quit; fi = alloca (size); |