summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-12-14 01:03:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-12-14 19:42:14 -0800
commit4e2b53708e0ca3f740815dbe7741f276069235ab (patch)
tree9ab94c71af5c7eacdcecf4756f9fd4413380ff38 /rpc
parent1637eabfd3e953a609cd5c82f58a7daa9d88b243 (diff)
setsockopt should be called with solaris specific arguments for solaris server
----- Original Message ----- From: "Raghavendra Bhat" <raghavendrabhat@gluster.com> To: glusterfs@dev.gluster.com Sent: Tuesday, December 14, 2010 11:56:43 AM Subject: [PATCH BUG:2205 v4] setsockopt should be called with solaris specific arguments for solaris server Looks fine to me. Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2205 ([glusterfs-3.1.2qa1]: error while setting the keepalive time interval) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2205
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index c121210c4..4ae49815a 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -376,8 +376,13 @@ __socket_keepalive (int fd, int keepalive_intvl, int keepalive_idle)
goto done;
#ifndef GF_LINUX_HOST_OS
+#ifdef GF_SOLARIS_HOST_OS
+ ret = setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive_intvl,
+ sizeof (keepalive_intvl));
+#else
ret = setsockopt (fd, IPPROTO_TCP, TCP_KEEPALIVE, &keepalive_intvl,
sizeof (keepalive_intvl));
+#endif
if (ret == -1)
goto err;
#else