summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-08-19 09:00:00 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-08-19 09:00:00 +0000
commit2e1ffa193e0bc4cf9e48d6fe47b952338b6bb88f (patch)
tree8e7d3887cfd9e273852347bee527c145fed87861
parent3e87e80031b19a18df69be9169f759bb3fb3c21d (diff)
downloaddrakx-2e1ffa193e0bc4cf9e48d6fe47b952338b6bb88f.tar
drakx-2e1ffa193e0bc4cf9e48d6fe47b952338b6bb88f.tar.gz
drakx-2e1ffa193e0bc4cf9e48d6fe47b952338b6bb88f.tar.bz2
drakx-2e1ffa193e0bc4cf9e48d6fe47b952338b6bb88f.tar.xz
drakx-2e1ffa193e0bc4cf9e48d6fe47b952338b6bb88f.zip
Gracefully handle IPPROTO_TCP in pmap_getport() [PR libc/4943]
-rw-r--r--mdk-stage1/dietlibc/librpc/pmap_getport.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdk-stage1/dietlibc/librpc/pmap_getport.c b/mdk-stage1/dietlibc/librpc/pmap_getport.c
index edf199e69..f26cb7621 100644
--- a/mdk-stage1/dietlibc/librpc/pmap_getport.c
+++ b/mdk-stage1/dietlibc/librpc/pmap_getport.c
@@ -67,8 +67,12 @@ unsigned int protocol;
struct pmap parms;
address->sin_port = htons((unsigned short)PMAPPORT);
- client = clntudp_bufcreate(address, PMAPPROG,
- PMAPVERS, timeout, &socket, RPCSMALLMSGSIZE,
+ if (protocol == IPPROTO_TCP)
+ client = clnttcp_create(address, PMAPPROG, PMAPVERS, &socket,
+ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
+ else
+ client = clntudp_bufcreate(address, PMAPPROG, PMAPVERS, timeout,
+ &socket, RPCSMALLMSGSIZE,
RPCSMALLMSGSIZE);
if (client != (CLIENT *) NULL) {
parms.pm_prog = program;