diff options
author | mbr <mbr@FreeBSD.org> | 2003-01-16 07:27:30 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2003-01-16 07:27:30 +0000 |
commit | f4b7d5938511f9f869d55eaf04dbfc04edcf0989 (patch) | |
tree | 9666afecfbd20dd475ac216552d1c46a292cf343 /usr.sbin/rpc.yppasswdd/yppasswdd_main.c | |
parent | 247cd2063c55a737d5fd75bc16a9a26a7631f458 (diff) | |
download | FreeBSD-src-f4b7d5938511f9f869d55eaf04dbfc04edcf0989.zip FreeBSD-src-f4b7d5938511f9f869d55eaf04dbfc04edcf0989.tar.gz |
Implement nonblocking tpc-connections. rpcgen -m does still
produce backcompatible code.
Reviewed by: rwatson
Obtained from: NetBSD
MFC after: 1 day
Diffstat (limited to 'usr.sbin/rpc.yppasswdd/yppasswdd_main.c')
-rw-r--r-- | usr.sbin/rpc.yppasswdd/yppasswdd_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c index 2f7e1e2..7c9b011 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c +++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c @@ -56,6 +56,7 @@ static const char rcsid[] = #include <unistd.h> #include <rpc/rpc.h> +#include <rpc/rpc_com.h> #include <rpc/pmap_clnt.h> /* for pmap_unset */ #include <rpcsvc/yp.h> struct dom_binding {}; @@ -171,6 +172,7 @@ main(int argc, char *argv[]) int ch; char *mastername; char myname[MAXHOSTNAMELEN + 2]; + int maxrec = RPC_MAXDATASIZE; extern int debug; @@ -273,6 +275,8 @@ the %s domain -- aborting", yppasswd_domain); rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL); rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL); + rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrec); + if (svc_create(yppasswdprog_1, YPPASSWDPROG, YPPASSWDVERS, "netpath") == 0) { yp_error("cannot create yppasswd service."); exit(1); |