Minor code cleanup in passive side handling of fork support.

Signed-off-by: Sean Hefty <sean.he...@intel.com>
---
 src/preload.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/preload.c b/src/preload.c
index b18d310..bb8e3fb 100644
--- a/src/preload.c
+++ b/src/preload.c
@@ -492,7 +492,7 @@ static void fork_passive(int socket)
        socklen_t len;
        uint32_t msg;
 
-       fd_get(socket, &sfd);
+       sfd = fd_getd(socket);
 
        len = sizeof sin6;
        ret = real.getsockname(sfd, (struct sockaddr *) &sin6, &len);
@@ -510,7 +510,7 @@ static void fork_passive(int socket)
 
        lfd = rsocket(sin6.sin6_family, SOCK_STREAM, 0);
        if (lfd < 0) {
-               ret  = lfd;
+               ret = lfd;
                goto sclose;
        }
 
@@ -537,10 +537,7 @@ static void fork_passive(int socket)
                goto lclose;
        }
 
-       param = 1;
-       rsetsockopt(dfd, IPPROTO_TCP, TCP_NODELAY, &param, sizeof param);
        set_rsocket_options(dfd);
-
        copysockopts(dfd, sfd, &rs, &real);
        real.shutdown(sfd, SHUT_RDWR);
        real.close(sfd);


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to