aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_sockets.c')
-rw-r--r--src/microhttpd/mhd_sockets.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
index 04405945..bc924651 100644
--- a/src/microhttpd/mhd_sockets.c
+++ b/src/microhttpd/mhd_sockets.c
@@ -474,20 +474,24 @@ MHD_socket_buffering_reset_ (MHD_socket sock)
474#if defined(TCP_NODELAY) || defined(MHD_TCP_CORK_NOPUSH) 474#if defined(TCP_NODELAY) || defined(MHD_TCP_CORK_NOPUSH)
475 const MHD_SCKT_OPT_BOOL_ off_val = 0; 475 const MHD_SCKT_OPT_BOOL_ off_val = 0;
476#if defined(MHD_TCP_CORK_NOPUSH) 476#if defined(MHD_TCP_CORK_NOPUSH)
477#if OLD_SOCKOPT
477 /* Disable extra buffering */ 478 /* Disable extra buffering */
478 res = (0 == setsockopt (sock, 479 res = (0 == setsockopt (sock,
479 IPPROTO_TCP, 480 IPPROTO_TCP,
480 MHD_TCP_CORK_NOPUSH, 481 MHD_TCP_CORK_NOPUSH,
481 (const void *) &off_val, 482 (const void *) &off_val,
482 sizeof (off_val))) && res; 483 sizeof (off_val))) && res;
484#endif
483#endif /* MHD_TCP_CORK_NOPUSH */ 485#endif /* MHD_TCP_CORK_NOPUSH */
484#if defined(TCP_NODELAY) 486#if defined(TCP_NODELAY)
487#if OLD_SOCKOPT
485 /* Enable Nagle's algorithm for normal buffering */ 488 /* Enable Nagle's algorithm for normal buffering */
486 res = (0 == setsockopt (sock, 489 res = (0 == setsockopt (sock,
487 IPPROTO_TCP, 490 IPPROTO_TCP,
488 TCP_NODELAY, 491 TCP_NODELAY,
489 (const void *) &off_val, 492 (const void *) &off_val,
490 sizeof (off_val))) && res; 493 sizeof (off_val))) && res;
494#endif
491#endif /* TCP_NODELAY */ 495#endif /* TCP_NODELAY */
492#else /* !TCP_NODELAY && !MHD_TCP_CORK_NOPUSH */ 496#else /* !TCP_NODELAY && !MHD_TCP_CORK_NOPUSH */
493 (void) sock; 497 (void) sock;