[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 95/154: simplify
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 95/154: simplify |
Date: |
Mon, 19 Aug 2019 10:16:47 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository libmicrohttpd.
commit 497c1d68bee5b9acac92b8d92b12d6a284cc8399
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Jul 25 20:19:11 2019 +0200
simplify
---
src/microhttpd/mhd_send.c | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 49fd1edf..111fdcfe 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -48,11 +48,6 @@ post_cork_setsockopt (struct MHD_Connection *connection,
const MHD_SCKT_OPT_BOOL_ on_val = 1;
#if TCP_CORK
- ret = setsockopt (connection->socket_fd,
- IPPROTO_TCP,
- TCP_CORK,
- (const void *) &on_val,
- sizeof (on_val));
#elif TCP_NODELAY
ret = setsockopt (connection->socket_fd,
IPPROTO_TCP,
@@ -92,18 +87,11 @@ pre_cork_setsockopt (struct MHD_Connection *connection,
ret = -1;
#if TCP_CORK
- if (want_cork)
- ret = setsockopt (connection->socket_fd,
- IPPROTO_TCP,
- TCP_CORK,
- (const void *) &on_val,
- sizeof (on_val));
- else
- ret = setsockopt (connection->socket_fd,
- IPPROTO_TCP,
- TCP_CORK,
- (const void *) &off_val,
- sizeof (off_val));
+ ret = setsockopt (connection->socket_fd,
+ IPPROTO_TCP,
+ TCP_CORK,
+ (const void *) want_cork ? &on_val : &off_val,
+ sizeof (on_val));
#elif TCP_NODELAY
ret = setsockopt (connection->socket_fd,
IPPROTO_TCP,
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [libmicrohttpd] 141/154: Document MHD_UPGRADE_ACTION_CORK_ON and HD_UPGRADE_ACTION_CORK_OFF., (continued)
- [GNUnet-SVN] [libmicrohttpd] 141/154: Document MHD_UPGRADE_ACTION_CORK_ON and HD_UPGRADE_ACTION_CORK_OFF., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 145/154: remove more code., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 143/154: fix a couple of fixmes: add log messages., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 137/154: remove obsolete OLD_SOCK if'd blocks., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 142/154: Add draft of Changelog., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 150/154: mhd_send.c: log EINVAL, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 148/154: Merge remote-tracking branch 'origin/master' into dev/ng0/gsoc2019, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 88/154: attempt fix, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 71/154: lisp sneeks in., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 75/154: switch functions., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 95/154: simplify,
gnunet <=
- [GNUnet-SVN] [libmicrohttpd] 68/154: Add MHD_send_socket_state_cork_nodelay_ and use it., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 65/154: remove old function name., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 94/154: simplify, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 89/154: attempt fix, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 97/154: simplify, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 108/154: have_cork->want_cork, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 91/154: show not tell, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 102/154: for tests, gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 86/154: initial move code sendfile., gnunet, 2019/08/19
- [GNUnet-SVN] [libmicrohttpd] 100/154: incomplete, gnunet, 2019/08/19