diff mbox

[4/7] librdmacm/rspreload: Minor cleanup of fork_passive handling

Message ID 1828884A29C6694DAF28B7E6B8A8237346A8996E@ORSMSX101.amr.corp.intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Hefty, Sean Aug. 16, 2012, 7:24 p.m. UTC
Minor code cleanup in passive side handling of fork support.

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



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

Patch

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);