diff options
author | ng0 <ng0@n0.is> | 2019-07-25 20:13:18 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-07-25 20:13:18 +0000 |
commit | 5880cd0cd3179e422150c2e2ee01778fda447108 (patch) | |
tree | 0817e73032ec41bfacbae18969c4f0c5d5215bbf /src/microhttpd | |
parent | b76dadc0fda1ea9565211093db8a9021a41361e8 (diff) | |
download | libmicrohttpd-5880cd0cd3179e422150c2e2ee01778fda447108.tar.gz libmicrohttpd-5880cd0cd3179e422150c2e2ee01778fda447108.zip |
incomplete
Diffstat (limited to 'src/microhttpd')
-rw-r--r-- | src/microhttpd/mhd_send.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 513b7dfb..6cbf9c90 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -70,14 +70,14 @@ post_cork_setsockopt (struct MHD_Connection *connection, | |||
70 | ret = setsockopt (connection->socket_fd, | 70 | ret = setsockopt (connection->socket_fd, |
71 | IPPROTO_TCP, | 71 | IPPROTO_TCP, |
72 | TCP_NOPUSH, | 72 | TCP_NOPUSH, |
73 | (const void *) &on_val, | 73 | (const void *) &off_val, |
74 | sizeof (on_val)); | 74 | sizeof (off_val)); |
75 | #endif | 75 | #endif |
76 | if (0 == ret) | 76 | if (0 == ret) |
77 | { | 77 | { |
78 | connection->sk_cork_on = want_cork; | 78 | connection->sk_cork_on = want_cork; |
79 | } | 79 | } |
80 | return ret; | 80 | return; |
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |
@@ -127,7 +127,7 @@ pre_cork_setsockopt (struct MHD_Connection *connection, | |||
127 | { | 127 | { |
128 | connection->sk_cork_on = want_cork; | 128 | connection->sk_cork_on = want_cork; |
129 | } | 129 | } |
130 | return ret; | 130 | return; |
131 | } | 131 | } |
132 | 132 | ||
133 | /** | 133 | /** |
@@ -190,7 +190,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
190 | } | 190 | } |
191 | 191 | ||
192 | /* ! could be avoided by redefining the variable. */ | 192 | /* ! could be avoided by redefining the variable. */ |
193 | have_cork = ! connection->sk_tcp_nodelay_on; | 193 | bool have_cork = ! connection->sk_tcp_nodelay_on; |
194 | 194 | ||
195 | #ifdef MSG_MORE | 195 | #ifdef MSG_MORE |
196 | have_more = true; | 196 | have_more = true; |
@@ -208,7 +208,8 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
208 | if (want_cork && ! have_cork) | 208 | if (want_cork && ! have_cork) |
209 | { | 209 | { |
210 | gnutls_record_cork (connection->tls_session); | 210 | gnutls_record_cork (connection->tls_session); |
211 | connection->sk_tcp_nodelay_on = false; | 211 | connection->sk_cork_on = false; |
212 | // connection->sk_tcp_nodelay_on = false; | ||
212 | } | 213 | } |
213 | if (buffer_size > SSIZE_MAX) | 214 | if (buffer_size > SSIZE_MAX) |
214 | buffer_size = SSIZE_MAX; | 215 | buffer_size = SSIZE_MAX; |
@@ -239,7 +240,8 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
239 | if (! want_cork && have_cork) | 240 | if (! want_cork && have_cork) |
240 | { | 241 | { |
241 | (void) gnutls_record_uncork (connection->tls_session, 0); | 242 | (void) gnutls_record_uncork (connection->tls_session, 0); |
242 | connection->sk_tcp_nodelay_on = true; | 243 | connection->sk_cork_on = true; |
244 | // connection->sk_tcp_nodelay_on = true; | ||
243 | } | 245 | } |
244 | } | 246 | } |
245 | else | 247 | else |