diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-07-25 20:14:21 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-07-25 20:14:21 +0200 |
commit | 8a68b2355f0d1d1732875e04e9844cff7e7d8902 (patch) | |
tree | 97a632c1bbcceaa65b8b1b1bc243effb4d24bc97 /src/microhttpd/mhd_send.c | |
parent | 20c16b79274adc3fa3a5ce0d8f53aeb83ad001db (diff) | |
download | libmicrohttpd-8a68b2355f0d1d1732875e04e9844cff7e7d8902.tar.gz libmicrohttpd-8a68b2355f0d1d1732875e04e9844cff7e7d8902.zip |
simplify
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index c6a1dec5..21e70bc2 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -43,19 +43,9 @@ post_cork_setsockopt (struct MHD_Connection *connection, | |||
43 | bool want_cork) | 43 | bool want_cork) |
44 | { | 44 | { |
45 | int ret; | 45 | int ret; |
46 | bool using_tls = false; | ||
47 | // const MHD_SCKT_OPT_BOOL_ state_val = val ? 1 : 0; | 46 | // const MHD_SCKT_OPT_BOOL_ state_val = val ? 1 : 0; |
48 | const MHD_SCKT_OPT_BOOL_ off_val = 0; | 47 | const MHD_SCKT_OPT_BOOL_ off_val = 0; |
49 | const MHD_SCKT_OPT_BOOL_ on_val = 1; | 48 | const MHD_SCKT_OPT_BOOL_ on_val = 1; |
50 | #ifdef HTTPS_SUPPORT | ||
51 | using_tls = (0 != (connection->daemon->options & MHD_USE_TLS)); | ||
52 | #endif | ||
53 | |||
54 | if (using_tls) | ||
55 | { | ||
56 | // not sure. | ||
57 | return 0; // ? without a value I get a return type error. | ||
58 | } | ||
59 | 49 | ||
60 | #if TCP_CORK | 50 | #if TCP_CORK |
61 | ret = setsockopt (connection->socket_fd, | 51 | ret = setsockopt (connection->socket_fd, |
@@ -90,20 +80,9 @@ pre_cork_setsockopt (struct MHD_Connection *connection, | |||
90 | bool want_cork) | 80 | bool want_cork) |
91 | { | 81 | { |
92 | int ret; | 82 | int ret; |
93 | bool using_tls = false; | ||
94 | // const MHD_SCKT_OPT_BOOL_ state_val = val ? 1 : 0; | 83 | // const MHD_SCKT_OPT_BOOL_ state_val = val ? 1 : 0; |
95 | const MHD_SCKT_OPT_BOOL_ off_val = 0; | 84 | const MHD_SCKT_OPT_BOOL_ off_val = 0; |
96 | const MHD_SCKT_OPT_BOOL_ on_val = 1; | 85 | const MHD_SCKT_OPT_BOOL_ on_val = 1; |
97 | #ifdef HTTPS_SUPPORT | ||
98 | using_tls = (0 != (connection->daemon->options & MHD_USE_TLS)); | ||
99 | #endif | ||
100 | |||
101 | if (using_tls) | ||
102 | { | ||
103 | // more gnutls work? | ||
104 | // or all of it because we want to somehow handle the tls and error handling for it here? | ||
105 | return 0; // return type error | ||
106 | } | ||
107 | 86 | ||
108 | // if sk_tcp_nodelay_on is already what we pass in, return. | 87 | // if sk_tcp_nodelay_on is already what we pass in, return. |
109 | if (connection->sk_tcp_nodelay_on == want_cork) | 88 | if (connection->sk_tcp_nodelay_on == want_cork) |