diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-10-31 17:38:41 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-10-31 17:38:41 +0300 |
commit | 0187a69d4a77990271ee17659d733196db60a8d2 (patch) | |
tree | 699521bcd1b399ea8b5a3ff65c7abd23a05e7db8 /src/microhttpd/daemon.c | |
parent | e1d1558570b8beb3fe32fc86a39e7d430e54f587 (diff) | |
download | libmicrohttpd-0187a69d4a77990271ee17659d733196db60a8d2.tar.gz libmicrohttpd-0187a69d4a77990271ee17659d733196db60a8d2.zip |
Unified timeout parameter processing
Fixed processing of MHD_OPTION_CONNECTION_TIMEOUT option.
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 5 |
1 files 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, | |||
5645 | #ifdef HAVE_MESSAGES | 5645 | #ifdef HAVE_MESSAGES |
5646 | MHD_DLOG (daemon, | 5646 | MHD_DLOG (daemon, |
5647 | _ ("The specified connection timeout (%u) is too large. " \ | 5647 | _ ("The specified connection timeout (%u) is too large. " \ |
5648 | "Maximum allowed value (" PRIu64 ") will be used " \ | 5648 | "Maximum allowed value (%" PRIu64 ") will be used " \ |
5649 | "instead.\n"), | 5649 | "instead.\n"), |
5650 | uv, | 5650 | uv, |
5651 | (UINT64_MAX / 2000 - 1)); | 5651 | (UINT64_MAX / 2000 - 1)); |
5652 | #endif | 5652 | #endif |
5653 | daemon->connection_timeout_ms = UINT64_MAX / 2000 - 1; | 5653 | uv = UINT64_MAX / 2000 - 1; |
5654 | } | 5654 | } |
5655 | else | ||
5656 | #endif /* (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT */ | 5655 | #endif /* (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT */ |
5657 | daemon->connection_timeout_ms = uv * 1000; | 5656 | daemon->connection_timeout_ms = uv * 1000; |
5658 | break; | 5657 | break; |