From c835a2334f84d74a0c13308444fd6895fb744980 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Tue, 21 May 2019 22:12:43 +0300 Subject: MHD_start_daemon(): report if TCP_FASTOPEN is used on supported platform --- src/microhttpd/daemon.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/microhttpd/daemon.c') diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index d3d46de3..b2185b4c 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -5210,12 +5210,18 @@ parse_options_va (struct MHD_Daemon *daemon, size_t); break; #endif -#ifdef TCP_FASTOPEN case MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE: +#ifdef TCP_FASTOPEN daemon->fastopen_queue_size = va_arg (ap, unsigned int); break; -#endif +#else /* ! TCP_FASTOPEN */ +#ifdef HAVE_MESSAGES + MHD_DLOG (daemon, + _("TCP fastopen is not supported on this platform\n")); + return MHD_NO; +#endif /* HAVE_MESSAGES */ +#endif /* ! TCP_FASTOPEN */ case MHD_OPTION_LISTENING_ADDRESS_REUSE: daemon->listening_address_reuse = va_arg (ap, unsigned int) ? 1 : -1; -- cgit v1.2.3