diff options
author | wpaul <wpaul@FreeBSD.org> | 1997-05-28 05:05:31 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1997-05-28 05:05:31 +0000 |
commit | 9e8ab1e62292b0db38935cfbd4d0f2b8ae9d9a91 (patch) | |
tree | fe57d84f04c73758d7f713f9140e48e516bd468c /lib/libc/rpc/clnt_generic.c | |
parent | acb47603edac092ecefcbe769df4dbbe55d0ba08 (diff) | |
download | FreeBSD-src-9e8ab1e62292b0db38935cfbd4d0f2b8ae9d9a91.zip FreeBSD-src-9e8ab1e62292b0db38935cfbd4d0f2b8ae9d9a91.tar.gz |
Resolve conflicts.
This concludes tonight's entertainment. Once I'm sure I haven't destroyed
the world with all these changes, I'll import the utilities. Everything
should continue to work as before. If it doesn't let me know.
Special thanks to Mark Murray for running a test 'make world' for me to
shake out the bugs, which, hopefully, I have fixed.
(And there was much rejoicing.)
Diffstat (limited to 'lib/libc/rpc/clnt_generic.c')
-rw-r--r-- | lib/libc/rpc/clnt_generic.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/libc/rpc/clnt_generic.c b/lib/libc/rpc/clnt_generic.c index fd0133f..ed754ea 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$"; +static char *rcsid = "$Id: clnt_generic.c,v 1.5 1996/12/30 14:17:20 peter Exp $"; #endif /* @@ -57,10 +57,27 @@ clnt_create(hostname, prog, vers, proto) struct hostent *h; struct protoent *p; struct sockaddr_in sin; + struct sockaddr_un sun; int sock; - struct timeval tv; + static struct timeval tv; CLIENT *client; + if (!strcmp(proto, "unix")) { + bzero((char *)&sun, sizeof(sun)); + sun.sun_family = AF_UNIX; + strcpy(sun.sun_path, hostname); + sun.sun_len = sizeof(sun.sun_len) + sizeof(sun.sun_family) + + strlen(sun.sun_path) + 1; + sock = RPC_ANYSOCK; + client = clntunix_create(&sun, prog, vers, &sock, 0, 0); + if (client == NULL) + return(NULL); + tv.tv_sec = 25; + tv.tv_usec = 0; + clnt_control(client, CLSET_TIMEOUT, &tv); + return(client); + } + h = gethostbyname(hostname); if (h == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNHOST; |