libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit ea79eedaaf2145a759b93255b7c0354bafc4625a
parent 622e750970adbd898b25f71ab58d9f526b7b96a1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 30 May 2026 23:40:30 +0200

remove another case of duplicate increment, same increment is also in lines 1089/1384; only set is_large_alloc once after mmap actually succeeded

Diffstat:
Msrc/mhd2/mempool_funcs.c | 1-
Msrc/mhd2/stream_process_reply.c | 5+++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mhd2/mempool_funcs.c b/src/mhd2/mempool_funcs.c @@ -338,7 +338,6 @@ mhd_pool_create (size_t max, /* Round up allocation to page granularity. */ alloc_size = max + MHD_sys_page_size_ - 1; alloc_size -= alloc_size % MHD_sys_page_size_; - pool->is_large_alloc = true; # if defined(mhd_MAP_ANONYMOUS) pool->memory = (uint8_t *) mmap (NULL, alloc_size, diff --git a/src/mhd2/stream_process_reply.c b/src/mhd2/stream_process_reply.c @@ -1034,7 +1034,8 @@ preprocess_dcc_action (struct MHD_Connection *restrict c, /** * Read next portion of the response file to the buffer, based on information * about amount of response content position. - * Handle file read errors, update response position. + * Handle file read errors, does NOT update response position (caller + * should do so on success). * @param c the stream to use * @param r the response to use * @param buf_size the size of the @a buf buffer @@ -1086,7 +1087,6 @@ read_response_file (struct MHD_Connection *restrict c, return false; } - c->rp.rsp_cntn_read_pos += *size_filled; return true; } @@ -1190,6 +1190,7 @@ mhd_stream_prep_unchunked_body (struct MHD_Connection *restrict c) &filled)) return true; /* Error, the stream is closed */ + c->rp.rsp_cntn_read_pos += filled; c->write_buffer_append_offset += filled; } else