diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-06-19 14:13:15 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-06-20 23:22:58 +0300 |
commit | 0f20fe46ee4496165a3eacaef0e7c66a67e517d8 (patch) | |
tree | a3336526bf324814ea842e579bd8d18a20e338c8 | |
parent | 67061d5ce2e8433dc97c75bca2711134b66fdc69 (diff) | |
download | libmicrohttpd-0f20fe46ee4496165a3eacaef0e7c66a67e517d8.tar.gz libmicrohttpd-0f20fe46ee4496165a3eacaef0e7c66a67e517d8.zip |
Fixed possible timeout value trim on 32-bits platforms
-rw-r--r-- | src/microhttpd/connection.c | 2 | ||||
-rw-r--r-- | src/microhttpd/daemon.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 453296eb..8833e9c6 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -6807,7 +6807,7 @@ MHD_set_connection_option (struct MHD_Connection *connection, | |||
6807 | XDLL_remove (daemon->manual_timeout_head, | 6807 | XDLL_remove (daemon->manual_timeout_head, |
6808 | daemon->manual_timeout_tail, | 6808 | daemon->manual_timeout_tail, |
6809 | connection); | 6809 | connection); |
6810 | connection->connection_timeout_ms = ui_val * 1000; | 6810 | connection->connection_timeout_ms = ((uint64_t) ui_val) * 1000; |
6811 | if (connection->connection_timeout_ms == daemon->connection_timeout_ms) | 6811 | if (connection->connection_timeout_ms == daemon->connection_timeout_ms) |
6812 | XDLL_insert (daemon->normal_timeout_head, | 6812 | XDLL_insert (daemon->normal_timeout_head, |
6813 | daemon->normal_timeout_tail, | 6813 | daemon->normal_timeout_tail, |
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index a09df69f..89dd535f 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -6308,7 +6308,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6308 | uv = UINT64_MAX / 4000 - 1; | 6308 | uv = UINT64_MAX / 4000 - 1; |
6309 | } | 6309 | } |
6310 | #endif /* (SIZEOF_UINT64_T - 2) <= SIZEOF_UNSIGNED_INT */ | 6310 | #endif /* (SIZEOF_UINT64_T - 2) <= SIZEOF_UNSIGNED_INT */ |
6311 | daemon->connection_timeout_ms = uv * 1000; | 6311 | daemon->connection_timeout_ms = ((uint64_t) uv) * 1000; |
6312 | break; | 6312 | break; |
6313 | case MHD_OPTION_NOTIFY_COMPLETED: | 6313 | case MHD_OPTION_NOTIFY_COMPLETED: |
6314 | daemon->notify_completed = va_arg (ap, | 6314 | daemon->notify_completed = va_arg (ap, |