From 086311a933ff53f8c064d833e69fe228bc7e8886 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Jan 2003 19:50:21 +0000 Subject: Update. * sunrpc/pm_getport.c (pmap_getport): Open TCP socket if protocol == IPPROTO_TCP. Patch by James Strandboge [PR libc/4943]. --- sunrpc/pm_getport.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sunrpc/pm_getport.c') diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c index a15f9785a5..00e1ba95bf 100644 --- a/sunrpc/pm_getport.c +++ b/sunrpc/pm_getport.c @@ -66,9 +66,13 @@ pmap_getport (address, program, version, protocol) struct pmap parms; address->sin_port = htons (PMAPPORT); - client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout, - &socket, RPCSMALLMSGSIZE, - RPCSMALLMSGSIZE); + if (protocol == IPPROTO_TCP) + client = INTUSE(clnttcp_create) (address, PMAPPROG, PMAPVERS, &socket, + RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); + else + client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout, + &socket, RPCSMALLMSGSIZE, + RPCSMALLMSGSIZE); if (client != (CLIENT *) NULL) { struct rpc_createerr *ce = &get_rpc_createerr (); -- cgit v1.2.3