[asterisk-commits] may: trunk r307969 - /trunk/addons/ooh323c/src/ooSocket.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 15 17:07:50 CST 2011


Author: may
Date: Tue Feb 15 17:07:47 2011
New Revision: 307969

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=307969
Log:
include tcp keepalive socket calls only on linux, freebsd and others
don't have these options on sockets.

Modified:
    trunk/addons/ooh323c/src/ooSocket.c

Modified: trunk/addons/ooh323c/src/ooSocket.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooSocket.c?view=diff&rev=307969&r1=307968&r2=307969
==============================================================================
--- trunk/addons/ooh323c/src/ooSocket.c (original)
+++ trunk/addons/ooh323c/src/ooSocket.c Tue Feb 15 17:07:47 2011
@@ -219,9 +219,11 @@
    }
    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;
 }




More information about the asterisk-commits mailing list