svn commit: r230279 - head/usr.sbin/ypserv
Hiroki Sato
hrs at FreeBSD.org
Tue Jan 17 20:39:34 UTC 2012
Author: hrs
Date: Tue Jan 17 20:39:33 2012
New Revision: 230279
URL: http://svn.freebsd.org/changeset/base/230279
Log:
Revert changes in r228790. It prevented the ypserv daemon from working with
with multiple socktypes.
Modified:
head/usr.sbin/ypserv/yp_main.c
Modified: head/usr.sbin/ypserv/yp_main.c
==============================================================================
--- head/usr.sbin/ypserv/yp_main.c Tue Jan 17 20:22:10 2012 (r230278)
+++ head/usr.sbin/ypserv/yp_main.c Tue Jan 17 20:39:33 2012 (r230279)
@@ -256,7 +256,6 @@ create_service(const int sock, const str
const struct __rpc_sockinfo *si)
{
int error;
- char *sname;
SVCXPRT *transp;
struct addrinfo hints, *res, *res0;
@@ -264,7 +263,6 @@ create_service(const int sock, const str
struct bindaddrlistent *blep;
struct netbuf svcaddr;
- sname = NULL;
SLIST_INIT(&sle_head);
memset(&hints, 0, sizeof(hints));
memset(&svcaddr, 0, sizeof(svcaddr));
@@ -344,6 +342,7 @@ create_service(const int sock, const str
if (strncmp("0", servname, 1) == 0) {
struct sockaddr *sap;
socklen_t slen;
+ char *sname;
sname = malloc(NI_MAXSERV);
if (sname == NULL) {
@@ -444,7 +443,6 @@ create_service(const int sock, const str
}
/* XXX: ignore error intentionally */
rpcb_set(YPPROG, YPVERS, nconf, &svcaddr);
- free(sname);
freeaddrinfo(res0);
return 0;
}
More information about the svn-src-head
mailing list