libmicrohttpd

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

commit e275dc739830aa1a01503348fff04ccc5258f42c
parent 1fe4a6c7025cb91f3410459a7a92d75fbbcd0df7
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sat, 23 Apr 2016 17:34:53 +0000

perf_get_concurrent: correctly detect available modes

Diffstat:
Msrc/testcurl/perf_get_concurrent.c | 20+++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c @@ -347,15 +347,17 @@ main (int argc, char *const *argv) errorCount += testMultithreadedGet (port++, 0); errorCount += testMultithreadedPoolGet (port++, 0); errorCount += testExternalGet (port++); -#ifndef WINDOWS - errorCount += testInternalGet (port++, MHD_USE_POLL); - errorCount += testMultithreadedGet (port++, MHD_USE_POLL); - errorCount += testMultithreadedPoolGet (port++, MHD_USE_POLL); -#endif -#if EPOLL_SUPPORT - errorCount += testInternalGet (port++, MHD_USE_EPOLL_LINUX_ONLY); - errorCount += testMultithreadedPoolGet (port++, MHD_USE_EPOLL_LINUX_ONLY); -#endif + if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_POLL)) + { + errorCount += testInternalGet (port++, MHD_USE_POLL); + errorCount += testMultithreadedGet (port++, MHD_USE_POLL); + errorCount += testMultithreadedPoolGet (port++, MHD_USE_POLL); + } + if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_EPOLL)) + { + errorCount += testInternalGet (port++, MHD_USE_EPOLL_LINUX_ONLY); + errorCount += testMultithreadedPoolGet (port++, MHD_USE_EPOLL_LINUX_ONLY); + } MHD_destroy_response (response); if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount);