diff options
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 36007929..656a3f14 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -132,7 +132,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
132 | #if TCP_CORK | 132 | #if TCP_CORK |
133 | if ((use_corknopush) && (have_cork && ! want_cork)) | 133 | if ((use_corknopush) && (have_cork && ! want_cork)) |
134 | { | 134 | { |
135 | if (0 == setsockopt (connection->socket_fd, | 135 | if (0 == setsockopt (s, |
136 | IPPROTO_TCP, | 136 | IPPROTO_TCP, |
137 | TCP_CORK, | 137 | TCP_CORK, |
138 | (const void *) &off_val, | 138 | (const void *) &off_val, |
@@ -140,7 +140,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
140 | { | 140 | { |
141 | connection->sk_tcp_nodelay = true; | 141 | connection->sk_tcp_nodelay = true; |
142 | } | 142 | } |
143 | else if (0 == setsockopt (connection->socket_fd, | 143 | else if (0 == setsockopt (s, |
144 | IPPROTO_TCP, | 144 | IPPROTO_TCP, |
145 | TCP_NODELAY, | 145 | TCP_NODELAY, |
146 | (const void *) &on_val, | 146 | (const void *) &on_val, |
@@ -158,7 +158,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
158 | * exist and we can disregard TCP_NODELAY unless requested. */ | 158 | * exist and we can disregard TCP_NODELAY unless requested. */ |
159 | if ((use_corknopush) && (have_cork && ! want_cork)) | 159 | if ((use_corknopush) && (have_cork && ! want_cork)) |
160 | { | 160 | { |
161 | if (0 == setsockopt (connection->socket_fd, | 161 | if (0 == setsockopt (s, |
162 | IPPROTO_TCP, | 162 | IPPROTO_TCP, |
163 | TCP_NOPUSH, | 163 | TCP_NOPUSH, |
164 | (const void *) &on_val, | 164 | (const void *) &on_val, |
@@ -171,7 +171,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
171 | #if TCP_NODELAY | 171 | #if TCP_NODELAY |
172 | if ((! use_corknopush) && (! have_cork && want_cork)) | 172 | if ((! use_corknopush) && (! have_cork && want_cork)) |
173 | { | 173 | { |
174 | if (0 == setsockopt (connection->socket_fd, | 174 | if (0 == setsockopt (s, |
175 | IPPROTO_TCP, | 175 | IPPROTO_TCP, |
176 | TCP_NODELAY, | 176 | TCP_NODELAY, |
177 | (const void *) &off_val, | 177 | (const void *) &off_val, |
@@ -217,7 +217,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
217 | { | 217 | { |
218 | /* plaintext transmission */ | 218 | /* plaintext transmission */ |
219 | #if MSG_MORE | 219 | #if MSG_MORE |
220 | ret = send (connection->socket_fd, | 220 | ret = send (s, |
221 | buffer, | 221 | buffer, |
222 | buffer_size, | 222 | buffer_size, |
223 | (want_cork ? MSG_MORE : 0)); | 223 | (want_cork ? MSG_MORE : 0)); |
@@ -254,7 +254,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
254 | { | 254 | { |
255 | if (! have_cork && want_cork && ! have_more) | 255 | if (! have_cork && want_cork && ! have_more) |
256 | { | 256 | { |
257 | if (0 == setsockopt (connection->socket_fd, | 257 | if (0 == setsockopt (s, |
258 | IPPROTO_TCP, | 258 | IPPROTO_TCP, |
259 | TCP_CORK, | 259 | TCP_CORK, |
260 | (const void *) &on_val, | 260 | (const void *) &on_val, |
@@ -262,7 +262,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
262 | { | 262 | { |
263 | connection->sk_tcp_nodelay_on = false; | 263 | connection->sk_tcp_nodelay_on = false; |
264 | } | 264 | } |
265 | else if (0 == setsockopt (connection->socket_fd, | 265 | else if (0 == setsockopt (s, |
266 | IPPROTO_TCP, | 266 | IPPROTO_TCP, |
267 | TCP_NODELAY, | 267 | TCP_NODELAY, |
268 | (const void *) &off_val, | 268 | (const void *) &off_val, |
@@ -285,7 +285,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
285 | { | 285 | { |
286 | if (have_cork && ! want_cork) | 286 | if (have_cork && ! want_cork) |
287 | { | 287 | { |
288 | if (0 == setsockopt (connection->socket_fd, | 288 | if (0 == setsockopt (s, |
289 | IPPROTO_TCP, | 289 | IPPROTO_TCP, |
290 | TCP_NODELAY, | 290 | TCP_NODELAY, |
291 | (const void *) &on_val, | 291 | (const void *) &on_val, |
@@ -346,7 +346,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
346 | { | 346 | { |
347 | if (! have_cork && want_cork) | 347 | if (! have_cork && want_cork) |
348 | { | 348 | { |
349 | if (0 == setsockopt (connection->socket_fd, | 349 | if (0 == setsockopt (s, |
350 | IPPROTO_TCP, | 350 | IPPROTO_TCP, |
351 | TCP_NODELAY, | 351 | TCP_NODELAY, |
352 | (const void *) &off_val, | 352 | (const void *) &off_val, |
@@ -371,7 +371,7 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
371 | if ((ret == header_len + buffer_len) && have_cork) | 371 | if ((ret == header_len + buffer_len) && have_cork) |
372 | { | 372 | { |
373 | // response complete, definitely uncork! | 373 | // response complete, definitely uncork! |
374 | setsockopt (connection->socket_fd, | 374 | setsockopt (s, |
375 | IPPROTO_TCP, | 375 | IPPROTO_TCP, |
376 | TCP_CORK, | 376 | TCP_CORK, |
377 | (const void *) &off_val, | 377 | (const void *) &off_val, |