diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2002-07-15 18:51:57 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2002-07-15 18:51:57 +0000 |
commit | af37179b5f735b7f12285fb1dcf700016751c0f6 (patch) | |
tree | a7c706e5ad9f636ce740a033b0fa75319465add7 /usr.sbin/rpc.statd | |
parent | 122b088a2a124a438b76843e3c7850471644ad09 (diff) | |
download | src-test2-af37179b5f735b7f12285fb1dcf700016751c0f6.tar.gz src-test2-af37179b5f735b7f12285fb1dcf700016751c0f6.zip |
Notes
Diffstat (limited to 'usr.sbin/rpc.statd')
-rw-r--r-- | usr.sbin/rpc.statd/statd.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/usr.sbin/rpc.statd/statd.c b/usr.sbin/rpc.statd/statd.c index b49a42856fb3..1a85514d38ad 100644 --- a/usr.sbin/rpc.statd/statd.c +++ b/usr.sbin/rpc.statd/statd.c @@ -44,7 +44,6 @@ static const char rcsid[] = #include <stdio.h> #include <stdlib.h> #include <rpc/rpc.h> -#include <rpc/pmap_clnt.h> #include <string.h> #include <syslog.h> #include <sys/types.h> @@ -71,19 +70,12 @@ main(int argc, char **argv) debug = 1; } - (void)pmap_unset(SM_PROG, SM_VERS); + (void)rpcb_unset(SM_PROG, SM_VERS, NULL); - transp = svcudp_create(RPC_ANYSOCK); - if (transp == NULL) + if (!svc_create(sm_prog_1, SM_PROG, SM_VERS, "udp")) errx(1, "cannot create udp service"); - if (!svc_register(transp, SM_PROG, SM_VERS, sm_prog_1, IPPROTO_UDP)) - errx(1, "unable to register (SM_PROG, SM_VERS, udp)"); - - transp = svctcp_create(RPC_ANYSOCK, 0, 0); - if (transp == NULL) + if (!svc_create(sm_prog_1, SM_PROG, SM_VERS, "tcp")) errx(1, "cannot create tcp service"); - if (!svc_register(transp, SM_PROG, SM_VERS, sm_prog_1, IPPROTO_TCP)) - errx(1, "unable to register (SM_PROG, SM_VERS, tcp)"); init_file("/var/db/statd.status"); /* Note that it is NOT sensible to run this program from inetd - the */ |