From 532be24b7ef077cdfe0129dee60ab1f934c24181 Mon Sep 17 00:00:00 2001 From: mbr Date: Thu, 29 May 2003 09:18:22 +0000 Subject: [PATCH] Use non-blocking mode for amd(8) too. The fix will be part of the next amd(8) snap. Reviewed by: rwatson Approved by: re Obtained from: NetBSD --- contrib/amd/conf/transp/transp_sockets.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/amd/conf/transp/transp_sockets.c b/contrib/amd/conf/transp/transp_sockets.c index 8a6a8b75486d..66b818a936ca 100644 --- a/contrib/amd/conf/transp/transp_sockets.c +++ b/contrib/amd/conf/transp/transp_sockets.c @@ -50,6 +50,9 @@ #include #include +#ifndef RPC_MAXDATASIZE +#define RPC_MAXDATASIZE 9000 +#endif /* * find the IP address that can be used to connect to the local host @@ -216,6 +219,8 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (* int create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, int *tcp_soAMQp, SVCXPRT **tcp_amqpp) { + int maxrec = RPC_MAXDATASIZE; + /* first create TCP service */ if (tcp_soAMQp) { *tcp_soAMQp = socket(AF_INET, SOCK_STREAM, 0); @@ -231,6 +236,9 @@ create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, int *tcp_soAMQp, SVCXPR return 2; } } +#ifdef SVCSET_CONNMAXREC + SVC_CONTROL(*tcp_amqpp, SVCSET_CONNMAXREC, &maxrec); +#endif /* next create UDP service */ if (udp_soAMQp) {