Used 'bool' for struct MHD_Connection::tls_read_ready

This commit is contained in:
Evgeny Grin (Karlson2k)
2016-11-14 15:51:47 +03:00
parent 0310cef014
commit e5eade4a32
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -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;
+1 -1
View File
@@ -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?