You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2013/07/29 14:38:00 UTC
svn commit: r1508023 - /qpid/proton/trunk/proton-c/src/posix/driver.c
Author: tross
Date: Mon Jul 29 12:38:00 2013
New Revision: 1508023
URL: http://svn.apache.org/r1508023
Log:
PROTON-362 - Replaced less-portable SOL_TCP with equivalent IPPROTO_TCP.
Applied patch from Bozo Dragojevic
Modified:
qpid/proton/trunk/proton-c/src/posix/driver.c
Modified: qpid/proton/trunk/proton-c/src/posix/driver.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/posix/driver.c?rev=1508023&r1=1508022&r2=1508023&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/posix/driver.c (original)
+++ qpid/proton/trunk/proton-c/src/posix/driver.c Mon Jul 29 12:38:00 2013
@@ -262,8 +262,11 @@ static void pn_configure_sock(int sock)
//
// Disable the Nagle algorithm on TCP connections.
//
+ // Note: It would be more correct for the "level" argument to be SOL_TCP. However, there
+ // are portability issues with this macro so we use IPPROTO_TCP instead.
+ //
int tcp_nodelay = 1;
- if (setsockopt(sock, SOL_TCP, TCP_NODELAY, (void*) &tcp_nodelay, sizeof(tcp_nodelay)) < 0) {
+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*) &tcp_nodelay, sizeof(tcp_nodelay)) < 0) {
perror("setsockopt");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org