[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 02/03: Check for invalid combinations of MH
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 02/03: Check for invalid combinations of MHD_OPTION_THREAD_POOL_SIZE and daemon flags. |
Date: |
Sat, 25 Mar 2017 19:01:27 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 0571f7bf52614ac091b9ae37a739539f4dbc0a5a
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Fri Mar 24 15:44:27 2017 +0300
Check for invalid combinations of MHD_OPTION_THREAD_POOL_SIZE and daemon
flags.
---
src/microhttpd/daemon.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index cbf57773..296c0ee8 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -4822,6 +4822,24 @@ parse_options_va (struct MHD_Daemon *daemon,
void *);
break;
case MHD_OPTION_THREAD_POOL_SIZE:
+ if (0 == (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD))
+ {
+#ifdef HAVE_MESSAGES
+ MHD_DLOG (daemon,
+ _("MHD_OPTION_THREAD_POOL_SIZE option is specified but
"
+ "MHD_USE_INTERNAL_POLLING_THREAD flag is not
specified.\n"));
+#endif
+ return MHD_NO;
+ }
+ if (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
+ {
+#ifdef HAVE_MESSAGES
+ MHD_DLOG (daemon,
+ _("Both MHD_OPTION_THREAD_POOL_SIZE option and "
+ "MHD_USE_THREAD_PER_CONNECTION flag are
specified.\n"));
+#endif
+ return MHD_NO;
+ }
daemon->worker_pool_size = va_arg (ap,
unsigned int);
if (0 == daemon->worker_pool_size)
--
To stop receiving notification emails like this one, please contact
address@hidden