Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 14 Jan 2003 19:50:21 +0000 (19:50 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 14 Jan 2003 19:50:21 +0000 (19:50 +0000)
* sunrpc/pm_getport.c (pmap_getport): Open TCP socket if protocol
== IPPROTO_TCP.
Patch by James Strandboge <jamie@tpptraining.com> [PR libc/4943].

ChangeLog
sunrpc/pm_getport.c

index 325c23d..de780c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
 
+       * sunrpc/pm_getport.c (pmap_getport): Open TCP socket if protocol
+       == IPPROTO_TCP.
+       Patch by James Strandboge <jamie@tpptraining.com> [PR libc/4943].
+
        * sysdeps/unix/sysv/linux/i386/dl-procinfo.c (_dl_x86_cap_flags):
        Fix entry for bit 31.
 
index a15f978..00e1ba9 100644 (file)
@@ -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 ();