*** empty log message ***

This commit is contained in:
Thomas Bushnell, BSG 1996-08-16 20:42:32 +00:00
parent 2de99474c3
commit a057e7dcc7
3 changed files with 23 additions and 4 deletions

View File

@ -209,7 +209,10 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
n = res_search (name, C_IN, type, host_buffer.buf, sizeof (host_buffer));
if (n < 0)
return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
return (errno == ECONNREFUSED
|| errno == EPFNOSUPPORT
|| errno == EAFNOSUPPORT)
? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen,
h_errnop);
@ -302,7 +305,10 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af,
n = res_query (qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
sizeof host_buffer);
if (n < 0)
return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
return (errno == ECONNREFUSED
|| errno == EPFNOSUPPORT
|| errno == EAFNOSUPPORT)
? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
h_errnop);

View File

@ -116,7 +116,10 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
sizeof (querybuf));
if (anslen < 0)
/* Nothing found. */
return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
return (errno == ECONNREFUSED
|| errno == EPFNOSUPPORT
|| errno == EAFNOSUPPORT)
? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
return getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYNAME);
}
@ -168,7 +171,10 @@ _nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
sizeof (querybuf));
if (anslen < 0)
/* Nothing found. */
return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
return (errno == ECONNREFUSED
|| errno == EPFNOSUPPORT
|| errno == EAFNOSUPPORT)
? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR);
if (status == NSS_STATUS_SUCCESS)

View File

@ -51,6 +51,13 @@ DEFUN(socket, (domain, type, protocol),
err = __socket_create (server, type, protocol, &sock);
}
/* These errors all mean that the server node doesn't support the
socket.defs protocol, which we'll take to mean that the protocol
isn't supported. */
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED
|| err == MIG_BAD_ID || err == EOPNOTSUPP)
err = EPFNOSUPPORT;
if (err)
return __hurd_fail (err);