aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-07-22 15:29:56 +0000
committerng0 <ng0@n0.is>2019-07-22 15:29:56 +0000
commit6d1993c5c1f52e259d5f5dacde5e321a3b1a19f2 (patch)
tree17b73a0c65459eb2b1bbcb437b83ef2006b22762 /src/microhttpd/connection.c
parente33528862ac09ae22d06baaf1d3b92d973dd2b22 (diff)
downloadlibmicrohttpd-6d1993c5c1f52e259d5f5dacde5e321a3b1a19f2.tar.gz
libmicrohttpd-6d1993c5c1f52e259d5f5dacde5e321a3b1a19f2.zip
connection.c: preprocessor ifdef some setsockopts.
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 4d93acee..887ad391 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -501,6 +501,7 @@ _MHD_static_inline bool
501socket_start_extra_buffering (struct MHD_Connection *connection) 501socket_start_extra_buffering (struct MHD_Connection *connection)
502{ 502{
503 mhd_assert(NULL != connection); 503 mhd_assert(NULL != connection);
504#if OLD_SOCKOPT
504#if defined(TCP_NODELAY) 505#if defined(TCP_NODELAY)
505 if (connection->sk_tcp_nodelay_on) 506 if (connection->sk_tcp_nodelay_on)
506 { 507 {
@@ -517,7 +518,9 @@ socket_start_extra_buffering (struct MHD_Connection *connection)
517 } 518 }
518 } 519 }
519#endif /* TCP_NODELAY */ 520#endif /* TCP_NODELAY */
521#endif /* OLD_SOCKOPT */
520 522
523#if OLD_SOCKOPT
521#if defined(MHD_TCP_CORK_NOPUSH) 524#if defined(MHD_TCP_CORK_NOPUSH)
522 if (!connection->sk_tcp_cork_nopush_on) 525 if (!connection->sk_tcp_cork_nopush_on)
523 { 526 {
@@ -534,12 +537,15 @@ socket_start_extra_buffering (struct MHD_Connection *connection)
534 } 537 }
535 } 538 }
536#endif /* MHD_TCP_CORK_NOPUSH */ 539#endif /* MHD_TCP_CORK_NOPUSH */
540#endif /* OLD_SOCKOPT */
537 541
542#if OLD_SOCKOPT
538#if defined(TCP_NODELAY) 543#if defined(TCP_NODELAY)
539 return connection->sk_tcp_cork_nopush_on && !connection->sk_tcp_nodelay_on; 544 return connection->sk_tcp_cork_nopush_on && !connection->sk_tcp_nodelay_on;
540#else /* ! TCP_NODELAY */ 545#else /* ! TCP_NODELAY */
541 return connection->sk_tcp_cork_nopush_on; 546 return connection->sk_tcp_cork_nopush_on;
542#endif /* ! TCP_NODELAY */ 547#endif /* ! TCP_NODELAY */
548#endif /* OLD_SOCKOPT */
543} 549}
544 550
545 551