Disable keep alive option in OSX.
authorKim Gunsoo <gunsoo83.kim@samsung.com>
Wed, 2 Dec 2015 02:50:53 +0000 (11:50 +0900)
committerKim Gunsoo <gunsoo83.kim@samsung.com>
Wed, 2 Dec 2015 02:50:53 +0000 (11:50 +0900)
- In OSX, disable the KEEP_ALIVE option to the socket connected with sdbd.

Change-Id: I3c31de0a123743b86b5d7f3c5c7b980961812f9b
Signed-off-by: Kim Gunsoo <gunsoo83.kim@samsung.com>
src/utils_unix.c

index b05c2c0d1573f12f3ed10685f09505c82529eb30..f2343632ca88a2b1c6b19096bec547c37081db64 100755 (executable)
@@ -154,6 +154,9 @@ static void  _close_on_exec(int  fd)
 
 static void _keep_alive(int fd, int onoff, int cnt, int idle, int interval)
 {
+#if defined(OS_DARWIN)
+    LOG_INFO("Not support keep alive option in OSX.\n");
+#else
     int ret = -1;
 
     ret = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &onoff, sizeof(onoff));
@@ -184,6 +187,7 @@ static void _keep_alive(int fd, int onoff, int cnt, int idle, int interval)
     }
 
     LOG_INFO("Success to set keep alive option. FD(%d), onoff=%d, cnt=%d, idle=%d(sec), interval=%d(sec)\n", onoff, cnt, idle, interval);
+#endif
 }
 
 static int _sdb_open( const char*  pathname, int  options )