libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 15672269083796ccf82bef665fb2cc586c575f0a
parent 5c197db398d6926dfb378bb4b4dbcf93566e9c1f
Author: ng0 <ng0@n0.is>
Date:   Sun, 21 Jul 2019 15:28:22 +0000

check getsockopt's.

Diffstat:
Msrc/microhttpd/mhd_send.c | 22++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c @@ -373,11 +373,12 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, if ((ret == header_len + buffer_len) && have_cork) { // Response complete, definitely uncork! - setsockopt (s, - IPPROTO_TCP, - TCP_CORK, - (const void *) &off_val, - sizeof (off_val)); + if (0 == setsockopt (s, + IPPROTO_TCP, + TCP_CORK, + (const void *) &off_val, + sizeof (off_val))) + ; } errno = eno; } @@ -393,11 +394,12 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, if (ret == header_len + buffer_len) { /* Response complete, set NOPUSH to off */ - setsockopt (s, - IPPROTO_TCP, - TCP_NOPUSH, - (const void *) &off_val, - sizeof (off_val)); + if (0 == setsockopt (s, + IPPROTO_TCP, + TCP_NOPUSH, + (const void *) &off_val, + sizeof (off_val))) + ; } errno = eno; }