libmicrohttpd2

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

commit 11a54be055cb52babacb81a759c524aba480f3ce
parent 3ed2aa2e76eadccbebdf56ba7d119c53aaafd25d
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Tue, 23 Dec 2025 20:03:52 +0100

Renamed some "stream" functions to "conn" functions

These functions are handling connections, not streams.

Diffstat:
Msrc/mhd2/conn_data_recv.c | 2+-
Msrc/mhd2/conn_data_send.c | 2+-
Msrc/mhd2/conn_timeout.c | 6+++---
Msrc/mhd2/conn_timeout.h | 6+++---
Msrc/mhd2/events_process.c | 2+-
Msrc/mhd2/stream_process_states.c | 2+-
6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/mhd2/conn_data_recv.c b/src/mhd2/conn_data_recv.c @@ -126,7 +126,7 @@ mhd_conn_data_recv (struct MHD_Connection *c, c->sk.state.rmt_shut_wr = true; c->read_buffer_offset += received; - mhd_stream_update_activity_mark (c); // TODO: centralise activity update + mhd_conn_update_activity_mark (c); // TODO: centralise activity update return; } diff --git a/src/mhd2/conn_data_send.c b/src/mhd2/conn_data_send.c @@ -408,7 +408,7 @@ mhd_conn_data_send (struct MHD_Connection *c) if (mhd_SOCKET_ERR_NO_ERROR == res) { - mhd_stream_update_activity_mark (c); // TODO: centralise activity mark updates + mhd_conn_update_activity_mark (c); // TODO: centralise activity mark updates } else if (mhd_SOCKET_ERR_IS_HARD (res)) { diff --git a/src/mhd2/conn_timeout.c b/src/mhd2/conn_timeout.c @@ -58,7 +58,7 @@ #include "conn_timeout.h" MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ bool -mhd_stream_is_timeout_expired (struct MHD_Connection *restrict c) +mhd_conn_is_timeout_expired (struct MHD_Connection *restrict c) { const uint_fast64_t timeout = c->connection_timeout_ms; uint_fast64_t now; @@ -103,7 +103,7 @@ mhd_stream_is_timeout_expired (struct MHD_Connection *restrict c) MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ void -mhd_stream_update_activity_mark (struct MHD_Connection *restrict c) +mhd_conn_update_activity_mark (struct MHD_Connection *restrict c) { struct MHD_Daemon *const restrict d = c->daemon; #if defined(MHD_SUPPORT_THREADS) @@ -130,7 +130,7 @@ mhd_stream_update_activity_mark (struct MHD_Connection *restrict c) MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ void -mhd_stream_resumed_activity_mark (struct MHD_Connection *restrict c) +mhd_conn_resumed_activity_mark (struct MHD_Connection *restrict c) { struct MHD_Daemon *const restrict d = c->daemon; #if defined(MHD_SUPPORT_THREADS) diff --git a/src/mhd2/conn_timeout.h b/src/mhd2/conn_timeout.h @@ -59,7 +59,7 @@ struct MHD_Connection; /* Forward declaration */ * 'false' otherwise */ MHD_INTERNAL bool -mhd_stream_is_timeout_expired (struct MHD_Connection *restrict c) +mhd_conn_is_timeout_expired (struct MHD_Connection *restrict c) MHD_FN_PAR_NONNULL_ALL_; @@ -68,7 +68,7 @@ MHD_FN_PAR_NONNULL_ALL_; * @param c the connection to update */ MHD_INTERNAL void -mhd_stream_update_activity_mark (struct MHD_Connection *restrict c) +mhd_conn_update_activity_mark (struct MHD_Connection *restrict c) MHD_FN_PAR_NONNULL_ALL_; @@ -77,7 +77,7 @@ MHD_FN_PAR_NONNULL_ALL_; * @param c the connection to update */ MHD_INTERNAL void -mhd_stream_resumed_activity_mark (struct MHD_Connection *restrict c) +mhd_conn_resumed_activity_mark (struct MHD_Connection *restrict c) MHD_FN_PAR_NONNULL_ALL_; diff --git a/src/mhd2/events_process.c b/src/mhd2/events_process.c @@ -241,7 +241,7 @@ start_resuming_connection (struct MHD_Connection *restrict c, (unsigned long long) c->sk.fd); #endif /* mhd_DEBUG_SUSPEND_RESUME */ c->suspended = false; - mhd_stream_resumed_activity_mark (c); + mhd_conn_resumed_activity_mark (c); mhd_conn_mark_ready (c, d); /* Force processing connection in this round */ } diff --git a/src/mhd2/stream_process_states.c b/src/mhd2/stream_process_states.c @@ -662,7 +662,7 @@ mhd_conn_process_data (struct MHD_Connection *restrict c) return false; } - if (mhd_stream_is_timeout_expired (c)) // TODO: centralise timeout checks + if (mhd_conn_is_timeout_expired (c)) // TODO: centralise timeout checks { mhd_conn_start_closing_timedout (c); return false;