libmicrohttpd

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

commit 3ba8a0c8b988289b512f88d60ccaaea7f52b472a
parent 8a84902f7447edd6f677dfa9983c16146dacc7c5
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 14 Feb 2017 18:00:17 +0100

convert 'thread_joined' to bool

Diffstat:
Msrc/microhttpd/daemon.c | 8++++----
Msrc/microhttpd/internal.h | 4++--
Msrc/testcurl/https/test_https_get.c | 2+-
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -2788,7 +2788,7 @@ MHD_cleanup_connections (struct MHD_Daemon *daemon) MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex); if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && - (MHD_NO == pos->thread_joined) && + (! pos->thread_joined) && (! MHD_join_thread_ (pos->pid)) ) MHD_PANIC (_("Failed to join a thread\n")); #ifdef UPGRADE_SUPPORT @@ -5658,11 +5658,11 @@ close_all_connections (struct MHD_Daemon *daemon) pos = daemon->connections_head; while (NULL != pos) { - if (MHD_YES != pos->thread_joined) + if (! pos->thread_joined) { if (! MHD_join_thread_ (pos->pid)) MHD_PANIC (_("Failed to join a thread\n")); - pos->thread_joined = MHD_YES; + pos->thread_joined = true; /* The thread may have concurrently modified the DLL, need to restart from the beginning */ pos = daemon->connections_head; @@ -5688,7 +5688,7 @@ close_all_connections (struct MHD_Daemon *daemon) while (NULL != (pos = daemon->connections_head)) { if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && - (MHD_YES != pos->thread_joined) ) + (! pos->thread_joined) ) MHD_PANIC (_("Failed to join a thread\n")); close_connection (pos); } diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h @@ -811,9 +811,9 @@ struct MHD_Connection int read_closed; /** - * Set to #MHD_YES if the thread has been joined. + * Set to `true` if the thread has been joined. */ - int thread_joined; + bool thread_joined; /** * Are we currently inside the "idle" handler (to avoid recursively diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c @@ -43,9 +43,9 @@ test_cipher_option (FILE * test_fd, const char *cipher_suite, int proto_version) { - int ret; struct MHD_Daemon *d; + d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_TLS | MHD_USE_ERROR_LOG, 4233, NULL, NULL, &http_ahc, NULL,