aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-07-19 19:27:48 +0200
committerChristian Grothoff <christian@grothoff.org>2019-07-19 19:27:48 +0200
commita2fefb3b732237cadca7c8562b3160ce8f23b09e (patch)
tree10e5927c2ec5c68b5274b3d327c786a4cec863d9
parent5847d13f470d525502b991f94bd5e0f77c302368 (diff)
downloadlibmicrohttpd-a2fefb3b732237cadca7c8562b3160ce8f23b09e.tar.gz
libmicrohttpd-a2fefb3b732237cadca7c8562b3160ce8f23b09e.zip
indentation, comments, issue
-rw-r--r--src/microhttpd/mhd_send.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index d713f1a8..6215af65 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -75,12 +75,10 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
75 size_t buffer_size, 75 size_t buffer_size,
76 enum MHD_SendSocketOptions options) 76 enum MHD_SendSocketOptions options)
77{ 77{
78 //size_t length, opt1, opt2;
79 // ssize_t num_bytes;
80 //int errno = 0;
81 bool want_cork; 78 bool want_cork;
82 bool have_cork; 79 bool have_cork;
83 bool have_more; 80 bool have_more;
81 bool use_corknopush;
84 bool using_tls = false; 82 bool using_tls = false;
85 /* The socket. */ 83 /* The socket. */
86 MHD_socket s = connection->socket_fd; 84 MHD_socket s = connection->socket_fd;
@@ -128,8 +126,6 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
128 have_more = false; 126 have_more = false;
129#endif 127#endif
130 128
131 bool use_corknopush;
132
133#if TCP_NODELAY 129#if TCP_NODELAY
134 use_corknopush = false; 130 use_corknopush = false;
135#elif TCP_CORK 131#elif TCP_CORK
@@ -180,8 +176,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
180 TCP_NOPUSH, 176 TCP_NOPUSH,
181 (const void *) &on_val, 177 (const void *) &on_val,
182 sizeof (on_val)); 178 sizeof (on_val));
183 // TODO: set corknopush to true here? 179 connection->sk_tcp_nodelay_on = false;
184 // connection->sk_tcp_cork_nopush_on = true;
185 } 180 }
186 } 181 }
187#endif 182#endif
@@ -275,13 +270,17 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
275 if (0 == setsockopt (connection->socket_fd, 270 if (0 == setsockopt (connection->socket_fd,
276 IPPROTO_TCP, 271 IPPROTO_TCP,
277 TCP_CORK, 272 TCP_CORK,
278 (const void *) &off_val, 273 (const void *) &off_val, // WHY OFF?
279 sizeof (off_val))) 274 sizeof (off_val)))
275 {
276 connection->sk_tcp_nodelay_on = true; // ???
277 }
280 else if (0 == setsockopt (connection->socket_fd, 278 else if (0 == setsockopt (connection->socket_fd,
281 IPPROTO_TCP, 279 IPPROTO_TCP,
282 TCP_NODELAY, 280 TCP_NODELAY,
283 (const void *) &off_val, 281 (const void *) &off_val,
284 sizeof (off_val))) { 282 sizeof (off_val)))
283 {
285 connection->sk_tcp_nodelay_on = false; 284 connection->sk_tcp_nodelay_on = false;
286 } 285 }
287 } 286 }
@@ -304,7 +303,8 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
304 IPPROTO_TCP, 303 IPPROTO_TCP,
305 TCP_NODELAY, 304 TCP_NODELAY,
306 (const void *) &on_val, 305 (const void *) &on_val,
307 sizeof (on_val))) { 306 sizeof (on_val)))
307 {
308 connection->sk_tcp_nodelay_on = true; 308 connection->sk_tcp_nodelay_on = true;
309 } 309 }
310 } 310 }