aboutsummaryrefslogtreecommitdiffstats
path: root/addons
diff options
context:
space:
mode:
authormay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-15 23:07:47 +0000
committermay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-15 23:07:47 +0000
commit18f4d9ca6b4d299973cc9a622948f096562c6b4d (patch)
tree6588078df600b9575d9720f30299d4994159cb2d /addons
parent2e3f3f2af7a66b49524a34d2d350140eb1c18800 (diff)
include tcp keepalive socket calls only on linux, freebsd and others
don't have these options on sockets. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@307969 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons')
-rw-r--r--addons/ooh323c/src/ooSocket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/ooh323c/src/ooSocket.c b/addons/ooh323c/src/ooSocket.c
index 128049bdc..5ec8ed5b3 100644
--- a/addons/ooh323c/src/ooSocket.c
+++ b/addons/ooh323c/src/ooSocket.c
@@ -219,9 +219,11 @@ int ooSocketCreate (OOSOCKET* psocket)
}
setsockopt (sock, SOL_SOCKET, SO_KEEPALIVE, (const char *)&keepalive,
sizeof(keepalive));
+#ifdef __linux__
setsockopt (sock, SOL_TCP, TCP_KEEPCNT, &keepcnt, sizeof(keepcnt));
setsockopt (sock, SOL_TCP, TCP_KEEPIDLE, &keepidle, sizeof(keepidle));
setsockopt (sock, SOL_TCP, TCP_KEEPINTVL, &keepintvl, sizeof(keepintvl));
+#endif
*psocket = sock;
return ASN_OK;
}