commit e5eade4a320e9a36ffe54548802172e30e418da3
parent 0310cef0141d5deb3917a7c322833cfd46b18bb7
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Mon, 14 Nov 2016 15:51:47 +0300
Used 'bool' for struct MHD_Connection::tls_read_ready
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -428,10 +428,10 @@ recv_tls_adapter (struct MHD_Connection *connection,
{
ssize_t res;
- if (MHD_YES == connection->tls_read_ready)
+ if (connection->tls_read_ready)
{
connection->daemon->num_tls_read_ready--;
- connection->tls_read_ready = MHD_NO;
+ connection->tls_read_ready = 0;
}
res = gnutls_record_recv (connection->tls_session,
other,
@@ -455,7 +455,7 @@ recv_tls_adapter (struct MHD_Connection *connection,
}
if ((size_t)res == i)
{
- connection->tls_read_ready = MHD_YES;
+ connection->tls_read_ready = !0;
connection->daemon->num_tls_read_ready++;
}
return res;
@@ -893,7 +893,7 @@ call_handlers (struct MHD_Connection *con,
bool was_initing = (con->state == MHD_CONNECTION_INIT);
#ifdef HTTPS_SUPPORT
- if (MHD_YES == con->tls_read_ready)
+ if (con->tls_read_ready)
read_ready = MHD_YES;
#endif /* HTTPS_SUPPORT */
if (read_ready)
@@ -1501,7 +1501,7 @@ thread_main_handle_connection (void *data)
tvp = NULL;
#ifdef HTTPS_SUPPORT
- if (MHD_YES == con->tls_read_ready)
+ if (con->tls_read_ready)
{
/* do not block (more data may be inside of TLS buffers waiting for us) */
tv.tv_sec = 0;
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
@@ -930,7 +930,7 @@ struct MHD_Connection
* Could it be that we are ready to read due to TLS buffers
* even though the socket is not?
*/
- int tls_read_ready;
+ bool tls_read_ready;
/**
* TLS layer was shut down?