[asterisk-commits] may: branch 1.8 r307970 - /branches/1.8/addons/ooh323c/src/ooSocket.c

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


Author: may
Date: Tue Feb 15 17:08:38 2011
New Revision: 307970

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

Modified:
    branches/1.8/addons/ooh323c/src/ooSocket.c

Modified: branches/1.8/addons/ooh323c/src/ooSocket.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/ooSocket.c?view=diff&rev=307970&r1=307969&r2=307970
==============================================================================
--- branches/1.8/addons/ooh323c/src/ooSocket.c (original)
+++ branches/1.8/addons/ooh323c/src/ooSocket.c Tue Feb 15 17:08:38 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