[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 01/02: convert 'thread_joined' to bool
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 01/02: convert 'thread_joined' to bool |
Date: |
Tue, 14 Feb 2017 18:06:07 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
commit 3ba8a0c8b988289b512f88d60ccaaea7f52b472a
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Feb 14 18:00:17 2017 +0100
convert 'thread_joined' to bool
---
src/microhttpd/daemon.c | 8 ++++----
src/microhttpd/internal.h | 4 ++--
src/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
index fda7f51b..5ac7c341 100644
--- 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
index 5acc21d9..a562454e 100644
--- 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
index f5b47e65..f8795b9b 100644
--- 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,
--
To stop receiving notification emails like this one, please contact
address@hidden