Revert changes in r228790. It prevented the ypserv daemon from working with
with multiple socktypes.
This commit is contained in:
parent
76f11d88aa
commit
b2870827a3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230279
@ -256,7 +256,6 @@ create_service(const int sock, const struct netconfig *nconf,
|
|||||||
const struct __rpc_sockinfo *si)
|
const struct __rpc_sockinfo *si)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
char *sname;
|
|
||||||
|
|
||||||
SVCXPRT *transp;
|
SVCXPRT *transp;
|
||||||
struct addrinfo hints, *res, *res0;
|
struct addrinfo hints, *res, *res0;
|
||||||
@ -264,7 +263,6 @@ create_service(const int sock, const struct netconfig *nconf,
|
|||||||
struct bindaddrlistent *blep;
|
struct bindaddrlistent *blep;
|
||||||
struct netbuf svcaddr;
|
struct netbuf svcaddr;
|
||||||
|
|
||||||
sname = NULL;
|
|
||||||
SLIST_INIT(&sle_head);
|
SLIST_INIT(&sle_head);
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
memset(&svcaddr, 0, sizeof(svcaddr));
|
memset(&svcaddr, 0, sizeof(svcaddr));
|
||||||
@ -344,6 +342,7 @@ create_service(const int sock, const struct netconfig *nconf,
|
|||||||
if (strncmp("0", servname, 1) == 0) {
|
if (strncmp("0", servname, 1) == 0) {
|
||||||
struct sockaddr *sap;
|
struct sockaddr *sap;
|
||||||
socklen_t slen;
|
socklen_t slen;
|
||||||
|
char *sname;
|
||||||
|
|
||||||
sname = malloc(NI_MAXSERV);
|
sname = malloc(NI_MAXSERV);
|
||||||
if (sname == NULL) {
|
if (sname == NULL) {
|
||||||
@ -444,7 +443,6 @@ create_service(const int sock, const struct netconfig *nconf,
|
|||||||
}
|
}
|
||||||
/* XXX: ignore error intentionally */
|
/* XXX: ignore error intentionally */
|
||||||
rpcb_set(YPPROG, YPVERS, nconf, &svcaddr);
|
rpcb_set(YPPROG, YPVERS, nconf, &svcaddr);
|
||||||
free(sname);
|
|
||||||
freeaddrinfo(res0);
|
freeaddrinfo(res0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user