aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r--src/microhttpd/mhd_send.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 6215af65..074ba115 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -99,7 +99,6 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
99 if (buffer_size > MHD_SCKT_SEND_MAX_SIZE_) 99 if (buffer_size > MHD_SCKT_SEND_MAX_SIZE_)
100 buffer_size = MHD_SCKT_SEND_MAX_SIZE_; /* return value limit */ 100 buffer_size = MHD_SCKT_SEND_MAX_SIZE_; /* return value limit */
101 101
102 // new code...
103 /* Get socket options, change/set options if necessary. */ 102 /* Get socket options, change/set options if necessary. */
104 switch (options) 103 switch (options)
105 { 104 {
@@ -148,11 +147,15 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
148 TCP_CORK, 147 TCP_CORK,
149 (const void *) &on_val, 148 (const void *) &on_val,
150 sizeof (on_val))) 149 sizeof (on_val)))
150 {
151 connection->sk_tcp_nodelay = false;
152 }
151 else if (0 == setsockopt (connection->socket_fd, 153 else if (0 == setsockopt (connection->socket_fd,
152 IPPROTO_TCP, 154 IPPROTO_TCP,
153 TCP_NODELAY, 155 TCP_NODELAY,
154 (const void *) &on_val, 156 (const void *) &on_val,
155 sizeof (on_val))) { 157 sizeof (on_val)))
158 {
156 connection->sk_tcp_nodelay = true; 159 connection->sk_tcp_nodelay = true;
157 } 160 }
158 //setsockopt (cork-on); // or nodelay on // + update connection->sk_tcp_nodelay_on 161 //setsockopt (cork-on); // or nodelay on // + update connection->sk_tcp_nodelay_on
@@ -266,14 +269,13 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
266 { 269 {
267 if (! have_cork && want_cork && ! have_more) 270 if (! have_cork && want_cork && ! have_more)
268 { 271 {
269 //setsockopt (cork-off); // or nodelay off // + update connection->sk_tcp_nodelay_on
270 if (0 == setsockopt (connection->socket_fd, 272 if (0 == setsockopt (connection->socket_fd,
271 IPPROTO_TCP, 273 IPPROTO_TCP,
272 TCP_CORK, 274 TCP_CORK,
273 (const void *) &off_val, // WHY OFF? 275 (const void *) &on_val,
274 sizeof (off_val))) 276 sizeof (on_val)))
275 { 277 {
276 connection->sk_tcp_nodelay_on = true; // ??? 278 connection->sk_tcp_nodelay_on = false;
277 } 279 }
278 else if (0 == setsockopt (connection->socket_fd, 280 else if (0 == setsockopt (connection->socket_fd,
279 IPPROTO_TCP, 281 IPPROTO_TCP,