From 0187a69d4a77990271ee17659d733196db60a8d2 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sun, 31 Oct 2021 17:38:41 +0300 Subject: [PATCH] Unified timeout parameter processing Fixed processing of MHD_OPTION_CONNECTION_TIMEOUT option. --- src/microhttpd/daemon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 1c115657..88e8d909 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -5645,14 +5645,13 @@ parse_options_va (struct MHD_Daemon *daemon, #ifdef HAVE_MESSAGES MHD_DLOG (daemon, _ ("The specified connection timeout (%u) is too large. " \ - "Maximum allowed value (" PRIu64 ") will be used " \ + "Maximum allowed value (%" PRIu64 ") will be used " \ "instead.\n"), uv, (UINT64_MAX / 2000 - 1)); #endif - daemon->connection_timeout_ms = UINT64_MAX / 2000 - 1; + uv = UINT64_MAX / 2000 - 1; } - else #endif /* (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT */ daemon->connection_timeout_ms = uv * 1000; break;