diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/c-ares/ares_gethostbyname.c | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/c-ares/ares_gethostbyname.c')
-rw-r--r-- | contrib/libs/c-ares/ares_gethostbyname.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/contrib/libs/c-ares/ares_gethostbyname.c b/contrib/libs/c-ares/ares_gethostbyname.c index 527b0b60e8..ecd03e7931 100644 --- a/contrib/libs/c-ares/ares_gethostbyname.c +++ b/contrib/libs/c-ares/ares_gethostbyname.c @@ -211,13 +211,13 @@ static void host_callback(void *arg, int status, int timeouts, if (host && channel->nsort) sort6_addresses(host, channel->sortlist, channel->nsort); } - if (status == ARES_SUCCESS && host && host->h_addr_list[0] == NULL) - { - /* The query returned something but had no A/AAAA record - (even after potentially retrying AAAA with A) - so we should treat this as an error */ - status = ARES_ENODATA; - } + if (status == ARES_SUCCESS && host && host->h_addr_list[0] == NULL) + { + /* The query returned something but had no A/AAAA record + (even after potentially retrying AAAA with A) + so we should treat this as an error */ + status = ARES_ENODATA; + } end_hquery(hquery, status, host); } else if ((status == ARES_ENODATA || status == ARES_EBADRESP || @@ -274,12 +274,12 @@ static int fake_hostent(const char *name, int family, } /* if we don't have 3 dots, it is illegal - * (although inet_pton doesn't think so). + * (although inet_pton doesn't think so). */ if (numdots != 3 || !valid) result = 0; else - result = (ares_inet_pton(AF_INET, name, &in) < 1 ? 0 : 1); + result = (ares_inet_pton(AF_INET, name, &in) < 1 ? 0 : 1); if (result) family = AF_INET; @@ -390,11 +390,11 @@ static int file_lookup(const char *name, int family, struct hostent **host) return ARES_ENOTFOUND; #endif - /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */ - if (ares__is_onion_domain(name)) - return ARES_ENOTFOUND; - - + /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */ + if (ares__is_onion_domain(name)) + return ARES_ENOTFOUND; + + fp = fopen(PATH_HOSTS, "r"); if (!fp) { |