libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 86706fd27dde169fef4146d4014f948c2d7ffe55
parent 82ce5348c515ab89da8521241c5d7c56d220ef45
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  4 Nov 2016 14:30:24 +0100

use MHD_YES/MHD_NO instead of 0/not-0

Diffstat:
Msrc/microhttpd/daemon.c | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -91,10 +91,10 @@ */ #define DEBUG_CONNECT MHD_NO -/* Forward declarations. */ + /** * Close all connections for the daemon. - * Must only be called when MHD_Daemon::shutdown was set to MHD_YES. + * Must only be called when MHD_Daemon::shutdown was set to #MHD_YES. * @remark To be called only from thread that process * daemon's select()/poll()/etc. * @@ -103,6 +103,7 @@ static void close_all_connections (struct MHD_Daemon *daemon); + /** * Default implementation of the panic function, * prints an error message and aborts. @@ -3661,7 +3662,7 @@ MHD_epoll (struct MHD_Daemon *daemon, unsigned int i; unsigned int series_length; #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) - _MHD_bool run_upgraded = 0; + int run_upgraded = MHD_NO; #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ if (-1 == daemon->epoll_fd) @@ -3774,7 +3775,7 @@ MHD_epoll (struct MHD_Daemon *daemon, { /* activity on an upgraded connection, we process those in a separate epoll() */ - run_upgraded = !0; + run_upgraded = MHD_YES; continue; } #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ @@ -3837,7 +3838,7 @@ MHD_epoll (struct MHD_Daemon *daemon, } #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) - if (run_upgraded) + if (MHD_YES == run_upgraded) run_epoll_for_upgrade (daemon); #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */ @@ -5437,7 +5438,7 @@ thread_failed: /** * Close all connections for the daemon. - * Must only be called when MHD_Daemon::shutdown was set to MHD_YES. + * Must only be called when MHD_Daemon::shutdown was set to #MHD_YES. * @remark To be called only from thread that process * daemon's select()/poll()/etc. * @@ -5526,7 +5527,8 @@ close_all_connections (struct MHD_Daemon *daemon) MHD_PANIC (_("MHD_stop_daemon() called while we have suspended connections.\n")); for (pos = daemon->connections_head; NULL != pos; pos = pos->next) { - shutdown (pos->socket_fd, SHUT_RDWR); + shutdown (pos->socket_fd, + SHUT_RDWR); #if MHD_WINSOCK_SOCKETS if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && (MHD_ITC_IS_VALID_(daemon->itc)) &&