diff options
author | ng0 <ng0@n0.is> | 2019-07-21 15:28:22 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-07-21 15:28:22 +0000 |
commit | 15672269083796ccf82bef665fb2cc586c575f0a (patch) | |
tree | dcadb719a03387d7f30d78645817bdbbe63c50aa | |
parent | 5c197db398d6926dfb378bb4b4dbcf93566e9c1f (diff) | |
download | libmicrohttpd-15672269083796ccf82bef665fb2cc586c575f0a.tar.gz libmicrohttpd-15672269083796ccf82bef665fb2cc586c575f0a.zip |
check getsockopt's.
-rw-r--r-- | src/microhttpd/mhd_send.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index dc2c8d69..ad63aa58 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -373,11 +373,12 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
373 | if ((ret == header_len + buffer_len) && have_cork) | 373 | if ((ret == header_len + buffer_len) && have_cork) |
374 | { | 374 | { |
375 | // Response complete, definitely uncork! | 375 | // Response complete, definitely uncork! |
376 | setsockopt (s, | 376 | if (0 == setsockopt (s, |
377 | IPPROTO_TCP, | 377 | IPPROTO_TCP, |
378 | TCP_CORK, | 378 | TCP_CORK, |
379 | (const void *) &off_val, | 379 | (const void *) &off_val, |
380 | sizeof (off_val)); | 380 | sizeof (off_val))) |
381 | ; | ||
381 | } | 382 | } |
382 | errno = eno; | 383 | errno = eno; |
383 | } | 384 | } |
@@ -393,11 +394,12 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
393 | if (ret == header_len + buffer_len) | 394 | if (ret == header_len + buffer_len) |
394 | { | 395 | { |
395 | /* Response complete, set NOPUSH to off */ | 396 | /* Response complete, set NOPUSH to off */ |
396 | setsockopt (s, | 397 | if (0 == setsockopt (s, |
397 | IPPROTO_TCP, | 398 | IPPROTO_TCP, |
398 | TCP_NOPUSH, | 399 | TCP_NOPUSH, |
399 | (const void *) &off_val, | 400 | (const void *) &off_val, |
400 | sizeof (off_val)); | 401 | sizeof (off_val))) |
402 | ; | ||
401 | } | 403 | } |
402 | errno = eno; | 404 | errno = eno; |
403 | } | 405 | } |