aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-07-24 13:11:34 +0000
committerng0 <ng0@n0.is>2019-07-24 13:11:34 +0000
commita1a0bf1a0a1f6b4fcb55c9cb0262a31759b45a65 (patch)
treeb46df8c41b40fe28a5bc6a3cc763aa36ee8a411f
parent9a088e236f55f076d2500f023949bff74f72e930 (diff)
downloadlibmicrohttpd-a1a0bf1a0a1f6b4fcb55c9cb0262a31759b45a65.tar.gz
libmicrohttpd-a1a0bf1a0a1f6b4fcb55c9cb0262a31759b45a65.zip
function replace.
-rw-r--r--src/microhttpd/connection.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 719ba7b6..4b8b7a4a 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -489,22 +489,11 @@ sendfile_adapter (struct MHD_Connection *connection)
489 * No other system in 2019-06 has TCP_CORK. */ 489 * No other system in 2019-06 has TCP_CORK. */
490 if ((! using_tls) && (use_corknopush) && (have_cork && ! want_cork)) 490 if ((! using_tls) && (use_corknopush) && (have_cork && ! want_cork))
491 { 491 {
492 if (0 == setsockopt (connection->socket_fd, 492 MHD_send_socket_state_cork_nodelay_ (connection,
493 IPPROTO_TCP, 493 false,
494 TCP_CORK, 494 true,
495 (const void *) &off_val, 495 true,
496 sizeof (off_val))) 496 true);
497 {
498 connection->sk_tcp_nodelay_on = true;
499 }
500 else if (0 == setsockopt (connection->socket_fd,
501 IPPROTO_TCP,
502 TCP_NODELAY,
503 (const void *) &on_val,
504 sizeof (on_val)))
505 {
506 connection->sk_tcp_nodelay_on = true;
507 }
508 } 497 }
509#elif TCP_NOPUSH 498#elif TCP_NOPUSH
510 /* TCP_NOPUSH on FreeBSD is equal to cork on Linux, with the 499 /* TCP_NOPUSH on FreeBSD is equal to cork on Linux, with the