diff --git a/net_util.c b/net_util.c index 02869c1..9fd08f7 100644 --- a/net_util.c +++ b/net_util.c @@ -30,7 +30,9 @@ static char *dns_resolve_filter(const char *host, int32_t family, uint8_t max_ad // If no host supplied, then use local machine name if (!host) { err = gethostname(name, sizeof(name)); - if (err != 0) + if (err != 0) { + printf("gethostname fail \n"); + } goto dns_resolve_error; printf("gethostname: %s\n", name); } else { @@ -39,8 +41,10 @@ static char *dns_resolve_filter(const char *host, int32_t family, uint8_t max_ad } err = getaddrinfo(name, NULL, NULL, &address_info); - if (err != 0) + if (err != 0) { + printf("getaddr fail\n"); goto dns_resolve_error; + } // Calculate the length of the return string size_t max_ai_string = 1;