aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r--src/microhttpd/mhd_send.c18
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?