summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.lockd
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-01-16 07:27:30 +0000
committermbr <mbr@FreeBSD.org>2003-01-16 07:27:30 +0000
commitf4b7d5938511f9f869d55eaf04dbfc04edcf0989 (patch)
tree9666afecfbd20dd475ac216552d1c46a292cf343 /usr.sbin/rpc.lockd
parent247cd2063c55a737d5fd75bc16a9a26a7631f458 (diff)
downloadFreeBSD-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.lockd')
-rw-r--r--usr.sbin/rpc.lockd/lockd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c
index 2f56aba..db8b669 100644
--- a/usr.sbin/rpc.lockd/lockd.c
+++ b/usr.sbin/rpc.lockd/lockd.c
@@ -61,6 +61,7 @@ __RCSID("$NetBSD: lockd.c,v 1.7 2000/08/12 18:08:44 thorpej Exp $");
#include <netconfig.h>
#include <rpc/rpc.h>
+#include <rpc/rpc_com.h>
#include <rpcsvc/sm_inter.h>
#include "lockd.h"
@@ -95,6 +96,7 @@ main(argc, argv)
struct sigaction sigalarm;
int grace_period = 30;
struct netconfig *nconf;
+ int maxrec = RPC_MAXDATASIZE;
while ((ch = getopt(argc, argv, "d:g:")) != (-1)) {
switch (ch) {
@@ -139,13 +141,16 @@ main(argc, argv)
maxindex = 4;
}
+ rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrec);
+
for (i = 0; i < maxindex; i++) {
nconf = getnetconfigent(transports[i]);
if (nconf == NULL)
errx(1, "cannot get %s netconf: %s.", transports[i],
nc_sperror());
- transp = svc_tli_create(RPC_ANYFD, nconf, NULL, 0, 0);
+ transp = svc_tli_create(RPC_ANYFD, nconf, NULL,
+ RPC_MAXDATASIZE, RPC_MAXDATASIZE);
if (transp == NULL) {
errx(1, "cannot create %s service.", transports[i]);
/* NOTREACHED */
OpenPOWER on IntegriCloud