aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-01-08 23:16:51 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-01-08 23:16:51 +0300
commita6ea76afd51d36d968f41f9f4a35b558626d377f (patch)
tree21afb52c7b8791c41901e9da5c31af09b124682e /src/microhttpd/daemon.c
parentbd3a8f5e00bccf6b25c1956d7c3456309d16ce96 (diff)
downloadlibmicrohttpd-a6ea76afd51d36d968f41f9f4a35b558626d377f.tar.gz
libmicrohttpd-a6ea76afd51d36d968f41f9f4a35b558626d377f.zip
connection->tls_read_ready: use 'true'/'false' instead of '!0'/'0'
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index e7f712df..1e94f218 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -431,7 +431,7 @@ recv_tls_adapter (struct MHD_Connection *connection,
431 if (connection->tls_read_ready) 431 if (connection->tls_read_ready)
432 { 432 {
433 connection->daemon->num_tls_read_ready--; 433 connection->daemon->num_tls_read_ready--;
434 connection->tls_read_ready = 0; 434 connection->tls_read_ready = false;
435 } 435 }
436 res = gnutls_record_recv (connection->tls_session, 436 res = gnutls_record_recv (connection->tls_session,
437 other, 437 other,
@@ -455,7 +455,7 @@ recv_tls_adapter (struct MHD_Connection *connection,
455 } 455 }
456 if ((size_t)res == i) 456 if ((size_t)res == i)
457 { 457 {
458 connection->tls_read_ready = !0; 458 connection->tls_read_ready = true;
459 connection->daemon->num_tls_read_ready++; 459 connection->daemon->num_tls_read_ready++;
460 } 460 }
461 return res; 461 return res;
@@ -1012,7 +1012,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
1012 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY; 1012 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY;
1013 /* Reading from remote client is not required anymore. */ 1013 /* Reading from remote client is not required anymore. */
1014 urh->app.celi &= ~MHD_EPOLL_STATE_READ_READY; 1014 urh->app.celi &= ~MHD_EPOLL_STATE_READ_READY;
1015 urh->connection->tls_read_ready = 0; 1015 urh->connection->tls_read_ready = false;
1016 } 1016 }
1017 1017
1018 /* handle reading from TLS client and writing to application */ 1018 /* handle reading from TLS client and writing to application */
@@ -1027,7 +1027,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
1027 if (buf_size > SSIZE_MAX) 1027 if (buf_size > SSIZE_MAX)
1028 buf_size = SSIZE_MAX; 1028 buf_size = SSIZE_MAX;
1029 1029
1030 urh->connection->tls_read_ready = 0; 1030 urh->connection->tls_read_ready = false;
1031 res = gnutls_record_recv (urh->connection->tls_session, 1031 res = gnutls_record_recv (urh->connection->tls_session,
1032 &urh->in_buffer[urh->in_buffer_used], 1032 &urh->in_buffer[urh->in_buffer_used],
1033 buf_size); 1033 buf_size);
@@ -1041,8 +1041,8 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
1041 urh->in_buffer_used += res; 1041 urh->in_buffer_used += res;
1042 if (0 < gnutls_record_check_pending (urh->connection->tls_session)) 1042 if (0 < gnutls_record_check_pending (urh->connection->tls_session))
1043 { 1043 {
1044 urh->connection->tls_read_ready = !0; 1044 urh->connection->tls_read_ready = true;
1045 urh->connection->daemon->has_tls_recv_ready = !0; 1045 urh->connection->daemon->has_tls_recv_ready = true;
1046 } 1046 }
1047 } 1047 }
1048 else if (0 >= res) 1048 else if (0 >= res)
@@ -1091,7 +1091,7 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
1091 urh->in_buffer_used = 0; 1091 urh->in_buffer_used = 0;
1092 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY; 1092 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY;
1093 urh->app.celi &= ~MHD_EPOLL_STATE_READ_READY; 1093 urh->app.celi &= ~MHD_EPOLL_STATE_READ_READY;
1094 urh->connection->tls_read_ready = 0; 1094 urh->connection->tls_read_ready = false;
1095 } 1095 }
1096 } 1096 }
1097 else 1097 else