diff options
author | peter <peter@FreeBSD.org> | 1996-12-30 14:17:20 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-12-30 14:17:20 +0000 |
commit | baa7d084d78ff5ef5a1da6d00778619d436a682f (patch) | |
tree | 11745930b22a8c55e57e338a8877050f2d88d256 /lib/libc/rpc/clnt_generic.c | |
parent | 8385a503c49fc020f2794bf1ece2be9cf242eb4a (diff) | |
download | FreeBSD-src-baa7d084d78ff5ef5a1da6d00778619d436a682f.zip FreeBSD-src-baa7d084d78ff5ef5a1da6d00778619d436a682f.tar.gz |
- use standard function
- timeout code repaired elsewhere, remove unneeded workaround
Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
Diffstat (limited to 'lib/libc/rpc/clnt_generic.c')
-rw-r--r-- | lib/libc/rpc/clnt_generic.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/rpc/clnt_generic.c b/lib/libc/rpc/clnt_generic.c index 44b9f79..86c6f3e 100644 --- a/lib/libc/rpc/clnt_generic.c +++ b/lib/libc/rpc/clnt_generic.c @@ -30,7 +30,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";*/ /*static char *sccsid = "from: @(#)clnt_generic.c 2.2 88/08/01 4.0 RPCSRC";*/ -static char *rcsid = "$Id: clnt_generic.c,v 1.3 1995/10/22 14:51:12 phk Exp $"; +static char *rcsid = "$Id: clnt_generic.c,v 1.4 1996/08/12 14:00:18 peter Exp $"; #endif /* @@ -78,8 +78,7 @@ clnt_create(hostname, prog, vers, proto) sin.sin_len = sizeof(struct sockaddr_in); sin.sin_family = h->h_addrtype; sin.sin_port = 0; - bzero(sin.sin_zero, sizeof(sin.sin_zero)); - bcopy(h->h_addr, (char*)&sin.sin_addr, h->h_length); + memcpy((char*)&sin.sin_addr, h->h_addr, h->h_length); p = getprotobyname(proto); if (p == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; @@ -95,17 +94,22 @@ clnt_create(hostname, prog, vers, proto) if (client == NULL) { return (NULL); } +#if 0 /* XXX do we need this? */ tv.tv_sec = 25; + tv.tv_usec = 0; clnt_control(client, CLSET_TIMEOUT, &tv); +#endif break; case IPPROTO_TCP: client = clnttcp_create(&sin, prog, vers, &sock, 0, 0); if (client == NULL) { return (NULL); } +#if 0 /* XXX do we need this? */ tv.tv_sec = 25; tv.tv_usec = 0; clnt_control(client, CLSET_TIMEOUT, &tv); +#endif break; default: rpc_createerr.cf_stat = RPC_SYSTEMERROR; |