From a54fe75ecddd2dd7db9abe3cea2e31eb4b3ff9ca Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Tue, 21 Nov 2023 09:53:20 +0300 Subject: [PATCH] MHD_start_daemon(): reject INTERNAL_POLLING_THREAD if threads are disabled --- src/microhttpd/daemon.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index a696b260..78153056 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -7626,6 +7626,11 @@ MHD_start_daemon_va (unsigned int flags, return NULL; #endif /* ! UPGRADE_SUPPORT */ } +#ifndef MHD_USE_THREADS + if (0 != (*pflags & MHD_USE_INTERNAL_POLLING_THREAD)) + return NULL; +#endif /* ! MHD_USE_THREADS */ + if (NULL == dh) return NULL;