]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Really(!) finish the port-sharing diff.
authorchip <chip>
Sun, 30 Apr 2000 04:14:56 +0000 (04:14 +0000)
committerchip <chip>
Sun, 30 Apr 2000 04:14:56 +0000 (04:14 +0000)
support/nfs/rpcmisc.c

index 527070b352a82c655b324f9081ed441211ddd2cd..457d642558c2c705ac0ea97a9d0a594ed5b536d1 100644 (file)
@@ -68,7 +68,8 @@ rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport,
                static SVCXPRT *last_transp = NULL;
  
                if (_rpcfdtype == 0) {
-                       if (last_transp && last_transp->xp_port == defport) {
+                       if (last_transp
+                           && (!defport || defport == last_transp->xp_port)) {
                                transp = last_transp;
                                goto udp_transport;
                        }
@@ -93,7 +94,8 @@ rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport,
                static SVCXPRT *last_transp = NULL;
 
                if (_rpcfdtype == 0) {
-                       if (last_transp && last_transp->xp_port == defport) {
+                       if (last_transp
+                           && (!defport || defport == last_transp->xp_port)) {
                                transp = last_transp;
                                goto tcp_transport;
                        }