diff options
author | ng0 <ng0@n0.is> | 2019-07-11 15:53:53 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-07-11 15:53:53 +0000 |
commit | 8edc3b919cebc8291f1f22916e7d9e831672d313 (patch) | |
tree | ea3d3fc521c0d0f8b05be2425578054a97803367 /src/microhttpd | |
parent | 67792e0c74b09848908e0cadcd7e3be89cb1b51d (diff) | |
download | libmicrohttpd-8edc3b919cebc8291f1f22916e7d9e831672d313.tar.gz libmicrohttpd-8edc3b919cebc8291f1f22916e7d9e831672d313.zip |
adjust
Diffstat (limited to 'src/microhttpd')
-rw-r--r-- | src/microhttpd/mhd_send.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 1cbe2d96..de228676 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -202,6 +202,22 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
202 | ret = send (connection->socket_fd, buffer, buffer_size, 0); | 202 | ret = send (connection->socket_fd, buffer, buffer_size, 0); |
203 | #endif | 203 | #endif |
204 | 204 | ||
205 | /* | ||
206 | // pseudo-code for gnutls corking | ||
207 | if (have_more_data && !corked) | ||
208 | gnutls_record_cork(connection->tls_session); | ||
209 | if (!have_more_data && corked) | ||
210 | gnutls_record_uncork(connection->tls_session); | ||
211 | */ | ||
212 | |||
213 | /* for TLS*/ | ||
214 | /* | ||
215 | if (0 != (daemon->options & MHD_USE_TLS)) | ||
216 | TLS; | ||
217 | else | ||
218 | no-TLS; | ||
219 | */ | ||
220 | |||
205 | // shouldn't we return 0 or -1? Why re-use the _ERR_ functions? | 221 | // shouldn't we return 0 or -1? Why re-use the _ERR_ functions? |
206 | // error handling from send_param_adapter(): | 222 | // error handling from send_param_adapter(): |
207 | if (0 > ret) | 223 | if (0 > ret) |
@@ -222,7 +238,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
222 | return MHD_ERR_NOTCONN_; | 238 | return MHD_ERR_NOTCONN_; |
223 | } | 239 | } |
224 | #if EPOLL_SUPPORT | 240 | #if EPOLL_SUPPORT |
225 | else if (i > (size_t) ret) | 241 | else if (buffer_size > (size_t) ret) |
226 | connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; | 242 | connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY; |
227 | #endif /* EPOLL_SUPPORT */ | 243 | #endif /* EPOLL_SUPPORT */ |
228 | // return ret; // should be return at the end of the function? | 244 | // return ret; // should be return at the end of the function? |