diff options
author | ng0 <ng0@n0.is> | 2019-07-22 15:51:16 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-07-22 15:51:16 +0000 |
commit | 4ebff9dc1650c9532f9dcff8d3c57a0e71e6bd29 (patch) | |
tree | aa1093d85647daad6481008a87578c498e22fec8 /src/microhttpd/connection.c | |
parent | 6d1993c5c1f52e259d5f5dacde5e321a3b1a19f2 (diff) | |
download | libmicrohttpd-4ebff9dc1650c9532f9dcff8d3c57a0e71e6bd29.tar.gz libmicrohttpd-4ebff9dc1650c9532f9dcff8d3c57a0e71e6bd29.zip |
more OLDSOCK.
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r-- | src/microhttpd/connection.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 887ad391..1893de15 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -558,6 +558,7 @@ socket_start_extra_buffering (struct MHD_Connection *connection) | |||
558 | _MHD_static_inline bool | 558 | _MHD_static_inline bool |
559 | socket_start_no_buffering (struct MHD_Connection *connection) | 559 | socket_start_no_buffering (struct MHD_Connection *connection) |
560 | { | 560 | { |
561 | #if OLD_SOCKOPT | ||
561 | #if defined(MHD_TCP_CORK_NOPUSH) | 562 | #if defined(MHD_TCP_CORK_NOPUSH) |
562 | if (connection->sk_tcp_cork_nopush_on) | 563 | if (connection->sk_tcp_cork_nopush_on) |
563 | { | 564 | { |
@@ -590,6 +591,7 @@ socket_start_no_buffering (struct MHD_Connection *connection) | |||
590 | } | 591 | } |
591 | #endif /* TCP_NODELAY */ | 592 | #endif /* TCP_NODELAY */ |
592 | return connection->sk_tcp_nodelay_on && !connection->sk_tcp_cork_nopush_on; | 593 | return connection->sk_tcp_nodelay_on && !connection->sk_tcp_cork_nopush_on; |
594 | #endif /* OLD_SOCKOPT */ | ||
593 | } | 595 | } |
594 | 596 | ||
595 | 597 | ||
@@ -607,6 +609,7 @@ socket_start_no_buffering_flush (struct MHD_Connection *connection) | |||
607 | #if defined(TCP_NOPUSH) && !defined(TCP_CORK) | 609 | #if defined(TCP_NOPUSH) && !defined(TCP_CORK) |
608 | const int dummy = 0; | 610 | const int dummy = 0; |
609 | #endif /* !TCP_CORK */ | 611 | #endif /* !TCP_CORK */ |
612 | #if OLD_SOCKOPT | ||
610 | #if defined(TCP_CORK) || (defined(__FreeBSD__) && __FreeBSD__+0 >= 9) | 613 | #if defined(TCP_CORK) || (defined(__FreeBSD__) && __FreeBSD__+0 >= 9) |
611 | const MHD_SCKT_OPT_BOOL_ off_val = 0; | 614 | const MHD_SCKT_OPT_BOOL_ off_val = 0; |
612 | /* Switching off TCP_CORK flush buffer even | 615 | /* Switching off TCP_CORK flush buffer even |
@@ -620,7 +623,7 @@ socket_start_no_buffering_flush (struct MHD_Connection *connection) | |||
620 | connection->sk_tcp_cork_nopush_on = false; | 623 | connection->sk_tcp_cork_nopush_on = false; |
621 | } | 624 | } |
622 | #endif /* MHD_TCP_CORK_NOPUSH */ | 625 | #endif /* MHD_TCP_CORK_NOPUSH */ |
623 | 626 | #endif /* OLD_SOCKOPT */ | |
624 | res = socket_start_no_buffering (connection); | 627 | res = socket_start_no_buffering (connection); |
625 | #if defined(__FreeBSD__) && __FreeBSD__+0 >= 9 | 628 | #if defined(__FreeBSD__) && __FreeBSD__+0 >= 9 |
626 | /* FreeBSD do not need zero-send for flushing starting from version 9 */ | 629 | /* FreeBSD do not need zero-send for flushing starting from version 9 */ |
@@ -646,6 +649,7 @@ _MHD_static_inline bool | |||
646 | socket_start_normal_buffering (struct MHD_Connection *connection) | 649 | socket_start_normal_buffering (struct MHD_Connection *connection) |
647 | { | 650 | { |
648 | mhd_assert(NULL != connection); | 651 | mhd_assert(NULL != connection); |
652 | #if OLD_SOCKOPT | ||
649 | #if defined(MHD_TCP_CORK_NOPUSH) | 653 | #if defined(MHD_TCP_CORK_NOPUSH) |
650 | if (connection->sk_tcp_cork_nopush_on) | 654 | if (connection->sk_tcp_cork_nopush_on) |
651 | { | 655 | { |
@@ -678,6 +682,7 @@ socket_start_normal_buffering (struct MHD_Connection *connection) | |||
678 | } | 682 | } |
679 | #endif /* TCP_NODELAY */ | 683 | #endif /* TCP_NODELAY */ |
680 | return !connection->sk_tcp_nodelay_on && !connection->sk_tcp_cork_nopush_on; | 684 | return !connection->sk_tcp_nodelay_on && !connection->sk_tcp_cork_nopush_on; |
685 | #endif | ||
681 | } | 686 | } |
682 | 687 | ||
683 | 688 | ||