diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-08-19 09:00:00 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2003-08-19 09:00:00 +0000 |
commit | 2e1ffa193e0bc4cf9e48d6fe47b952338b6bb88f (patch) | |
tree | 8e7d3887cfd9e273852347bee527c145fed87861 /mdk-stage1 | |
parent | 3e87e80031b19a18df69be9169f759bb3fb3c21d (diff) | |
download | drakx-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]
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/dietlibc/librpc/pmap_getport.c | 8 |
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; |