diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-06-05 22:31:48 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-06-05 23:01:56 +0300 |
commit | de669ead802049bb06f9672aa873b424b8201727 (patch) | |
tree | 109a9f20005dae8fca43f4fb0993b22334fe27bf /src/microhttpd/connection.c | |
parent | 1d356a1f480dc11eef0bfe374ee21ea2ecc5ca7a (diff) | |
download | libmicrohttpd-de669ead802049bb06f9672aa873b424b8201727.tar.gz libmicrohttpd-de669ead802049bb06f9672aa873b424b8201727.zip |
Merged MHD_tls_connection_handle_read() into MHD_connection_handle_read()
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r-- | src/microhttpd/connection.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 1a692618..c0fb687b 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -2667,6 +2667,17 @@ MHD_connection_handle_read (struct MHD_Connection *connection) | |||
2667 | if ( (MHD_CONNECTION_CLOSED == connection->state) || | 2667 | if ( (MHD_CONNECTION_CLOSED == connection->state) || |
2668 | (connection->suspended) ) | 2668 | (connection->suspended) ) |
2669 | return MHD_YES; | 2669 | return MHD_YES; |
2670 | #ifdef HTTPS_SUPPORT | ||
2671 | if (MHD_TLS_CONN_NO_TLS != connection->tls_state) | ||
2672 | { /* HTTPS connection. */ | ||
2673 | if (MHD_TLS_CONN_CONNECTED > connection->tls_state) | ||
2674 | { | ||
2675 | if (!MHD_run_tls_handshake_ (connection)) | ||
2676 | return MHD_YES; | ||
2677 | } | ||
2678 | } | ||
2679 | #endif /* HTTPS_SUPPORT */ | ||
2680 | |||
2670 | /* make sure "read" has a reasonable number of bytes | 2681 | /* make sure "read" has a reasonable number of bytes |
2671 | in buffer to use per system call (if possible) */ | 2682 | in buffer to use per system call (if possible) */ |
2672 | if (connection->read_buffer_offset + connection->daemon->pool_increment > | 2683 | if (connection->read_buffer_offset + connection->daemon->pool_increment > |
@@ -3624,7 +3635,6 @@ MHD_connection_epoll_update_ (struct MHD_Connection *connection) | |||
3624 | void | 3635 | void |
3625 | MHD_set_http_callbacks_ (struct MHD_Connection *connection) | 3636 | MHD_set_http_callbacks_ (struct MHD_Connection *connection) |
3626 | { | 3637 | { |
3627 | connection->read_handler = &MHD_connection_handle_read; | ||
3628 | connection->write_handler = &MHD_connection_handle_write; | 3638 | connection->write_handler = &MHD_connection_handle_write; |
3629 | connection->recv_cls = &recv_param_adapter; | 3639 | connection->recv_cls = &recv_param_adapter; |
3630 | connection->send_cls = &send_param_adapter; | 3640 | connection->send_cls = &send_param_adapter; |