summaryrefslogtreecommitdiff
path: root/lib/server/TcpNice.cpp
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2018-02-20 21:50:22 -0500
committerReinhard Tartler <siretart@tauware.de>2018-02-20 21:50:22 -0500
commitf6d7cfd710de1bf9d4f6eabab45570bc91941ee1 (patch)
tree6aed4f8606e47c6ef21c5b1d8bbf7cafa694af6e /lib/server/TcpNice.cpp
parentc81b92946b58b90fe9679a476338e2d2dec8df67 (diff)
parentf28f88e5e72ba1499409047a9d6985eb312c0232 (diff)
Merge branch 'upstream'
Diffstat (limited to 'lib/server/TcpNice.cpp')
-rw-r--r--lib/server/TcpNice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/server/TcpNice.cpp b/lib/server/TcpNice.cpp
index 40e7a6b5..79e91eeb 100644
--- a/lib/server/TcpNice.cpp
+++ b/lib/server/TcpNice.cpp
@@ -146,7 +146,7 @@ void NiceSocketStream::Write(const void *pBuffer, int NBytes)
int socket = mapSocket->GetSocketHandle();
int rtt = 50; // WAG
-# if HAVE_DECL_SOL_TCP && HAVE_DECL_TCP_INFO && HAVE_STRUCT_TCP_INFO_TCPI_RTT
+# if HAVE_DECL_SOL_TCP && defined HAVE_STRUCT_TCP_INFO_TCPI_RTT
struct tcp_info info;
socklen_t optlen = sizeof(info);
if(getsockopt(socket, SOL_TCP, TCP_INFO, &info, &optlen) == -1)
@@ -164,7 +164,7 @@ void NiceSocketStream::Write(const void *pBuffer, int NBytes)
{
rtt = info.tcpi_rtt;
}
-# endif
+# endif // HAVE_DECL_SOL_TCP && defined HAVE_STRUCT_TCP_INFO_TCPI_RTT
int newWindow = mTcpNice.GetNextWindowSize(mBytesWrittenThisPeriod,
elapsed, rtt);