commit b4a7abf366b0b05a8a468d48f37b4eeb86130772
parent b57456c2e6536764ad7b065c70b999f876269a2c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Tue, 25 Apr 2017 19:14:14 +0300
MHD_start_daemon(): allow MHD_USE_POLL only with MHD_USE_THREAD_PER_CONNECTION for backward compatibility.
New applications are advised to use MHD_USE_INTERNAL_POLLING_THREAD with MHD_USE_THREAD_PER_CONNECTION.
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Apr 25 19:11:00 CEST 2017
+ Allow flag MHD_USE_POLL with MHD_USE_THREAD_PER_CONNECTION and without
+ flag MHD_USE_INTERNAL_POLLING_THREAD for backward compatibility. -EG
+
Mon Apr 24 17:29:45 CEST 2017
Enforce RFC 7230's rule on no whitespace by default,
introduce new MHD_USE_PERMISSIVE_CHECKS to disable. -CG
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -5366,7 +5366,8 @@ MHD_start_daemon_va (unsigned int flags,
/* Check for invalid combinations of flags. */
if ( ((0 != (*pflags & MHD_USE_POLL)) && (0 != (*pflags & MHD_USE_EPOLL))) ||
((0 != (*pflags & MHD_USE_EPOLL)) && (0 != (*pflags & MHD_USE_THREAD_PER_CONNECTION))) ||
- ((0 != (*pflags & MHD_USE_POLL)) && (0 == (*pflags & MHD_USE_INTERNAL_POLLING_THREAD))) ||
+ ((0 != (*pflags & MHD_USE_POLL)) &&
+ (0 == (*pflags & (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_THREAD_PER_CONNECTION)))) ||
((0 != (*pflags & MHD_USE_AUTO)) && (0 != (*pflags & (MHD_USE_POLL | MHD_USE_EPOLL)))) )
return NULL;