[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 32/154: setsockopt(): check return value.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 32/154: setsockopt(): check return value. |
Date: |
Mon, 19 Aug 2019 10:15:44 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository libmicrohttpd.
commit 23a7502ef4edca9546a00ac3b9f88e126414aeb0
Author: ng0 <address@hidden>
AuthorDate: Fri Jul 19 18:18:53 2019 +0000
setsockopt(): check return value.
---
src/microhttpd/mhd_send.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index f087a326..18fa617f 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -165,23 +165,27 @@ MHD_send_on_connection_ (struct MHD_Connection
*connection,
*/
if ((use_corknopush) && (have_cork && ! want_cork))
{
- setsockopt (connection->socket_fd,
- IPPROTO_TCP,
- TCP_NOPUSH,
- (const void *) &on_val,
- sizeof (on_val));
- connection->sk_tcp_nodelay_on = false;
+ if (0 == setsockopt (connection->socket_fd,
+ IPPROTO_TCP,
+ TCP_NOPUSH,
+ (const void *) &on_val,
+ sizeof (on_val)))
+ {
+ connection->sk_tcp_nodelay_on = false;
+ }
}
#endif
#if TCP_NODELAY
if ((! use_corknopush) && (! have_cork && want_cork))
{
- setsockopt (connection->socket_fd,
- IPPROTO_TCP,
- TCP_NODELAY,
- (const void *) &off_val,
- sizeof (off_val));
- connection->sk_tcp_nodelay_on = false;
+ if (0 == setsockopt (connection->socket_fd,
+ IPPROTO_TCP,
+ TCP_NODELAY,
+ (const void *) &off_val,
+ sizeof (off_val)))
+ {
+ connection->sk_tcp_nodelay_on = false;
+ }
}
#endif
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [libmicrohttpd] 18/154: more from connection.c, without checks so far., (continued)
- [GNUnet-SVN] [libmicrohttpd] 18/154: more from connection.c, without checks so far., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 16/154: mhd_send: Use MHD_SCKT_OPT_BOOL_ for setsockopt optval., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 28/154: fixes, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 43/154: move comment above function., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 25/154: inline TLS logic, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 15/154: iAdd headerfile for mhd_send., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 26/154: indentation, comments, issue, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 29/154: fix err logic, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 10/154: mhd_send: Restructure., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 27/154: fixes, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 32/154: setsockopt(): check return value.,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 21/154: mhd_send.c: Use daemon from connection struct., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 45/154: fix compiler error., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 44/154: remove verbose comments in mhd_send.c, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 55/154: doxygen: MHD_SSO, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 30/154: comments, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 49/154: more OLDSOCK., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 59/154: sendfile and netbsd, comment., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 31/154: combine ifs, fix uninitialized var error, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 62/154: fix errors., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 35/154: use using_tls, gnunet, 2019/08/19