@@ -625,10 +625,8 @@ query_servinfo(const char *domain, int proto,
break;
case DNS_ERROR_RCODE_NAME_ERROR:
- return EAI_NONAME; /* HOST_NOT_FOUND */
-
case DNS_INFO_NO_RECORDS:
- return EAI_NODATA; /* NO_DATA */
+ return EAI_NONAME; /* HOST_NOT_FOUND */
case DNS_ERROR_NO_DNS_SERVERS:
case DNS_ERROR_RCODE_FORMAT_ERROR:
@@ -642,7 +640,7 @@ query_servinfo(const char *domain, int proto,
return EAI_AGAIN; /* TRY_AGAIN */
default:
- return EAI_NODATA;
+ return EAI_FAIL;
}
struct servinfo *list = NULL, *first = NULL;
@@ -682,7 +680,7 @@ query_servinfo(const char *domain, int proto,
}
else
{
- status = EAI_NODATA;
+ status = EAI_FAIL;
}
done:
@@ -717,13 +715,11 @@ query_servinfo(const char *domain, int proto,
switch (h_errno)
{
case HOST_NOT_FOUND:
- return EAI_NONAME;
-
case NO_ADDRESS:
#if NO_ADDRESS != NO_DATA
case NO_DATA:
#endif
- return EAI_NODATA;
+ return EAI_NONAME;
case NO_RECOVERY:
return EAI_FAIL;
@@ -782,7 +778,7 @@ query_servinfo(const char *domain, int proto,
}
else
{
- status = EAI_NODATA;
+ status = EAI_FAIL;
}
done: