commit 8edc3b919cebc8291f1f22916e7d9e831672d313
parent 67792e0c74b09848908e0cadcd7e3be89cb1b51d
Author: ng0 <ng0@n0.is>
Date: Thu, 11 Jul 2019 15:53:53 +0000
adjust
Diffstat:
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
@@ -202,6 +202,22 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
ret = send (connection->socket_fd, buffer, buffer_size, 0);
#endif
+ /*
+ // pseudo-code for gnutls corking
+ if (have_more_data && !corked)
+ gnutls_record_cork(connection->tls_session);
+ if (!have_more_data && corked)
+ gnutls_record_uncork(connection->tls_session);
+ */
+
+ /* for TLS*/
+ /*
+ if (0 != (daemon->options & MHD_USE_TLS))
+ TLS;
+ else
+ no-TLS;
+ */
+
// shouldn't we return 0 or -1? Why re-use the _ERR_ functions?
// error handling from send_param_adapter():
if (0 > ret)
@@ -222,7 +238,7 @@ MHD_send_on_connection_ (struct MHD_Connection *connection,
return MHD_ERR_NOTCONN_;
}
#if EPOLL_SUPPORT
- else if (i > (size_t) ret)
+ else if (buffer_size > (size_t) ret)
connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY;
#endif /* EPOLL_SUPPORT */
// return ret; // should be return at the end of the function?