libmicrohttpd2

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

commit 8348f26bb8b3e6f7bda95054a4543f18f697464b
parent 3077e3b2242cf673b439d746bc7dca4345b05a32
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Mon,  8 Dec 2025 17:52:13 +0100

Renamed H2 deinitialisation function, improved doxy

Diffstat:
Msrc/mhd2/events_process.c | 2+-
Msrc/mhd2/h2/h2_comm.c | 9+++++----
Msrc/mhd2/h2/h2_comm.h | 2+-
Msrc/mhd2/stream_funcs.h | 2+-
4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/mhd2/events_process.c b/src/mhd2/events_process.c @@ -573,7 +573,7 @@ mhd_daemon_close_all_conns (struct MHD_Daemon *d) { #ifdef MHD_SUPPORT_HTTP2 if (mhd_C_IS_HTTP2 (c)) - mhd_h2_conn_deinit (c); + mhd_h2_conn_h2_deinit_start_closing (c); else #endif /* MHD_SUPPORT_HTTP2 */ mhd_conn_start_closing_d_shutdown (c); diff --git a/src/mhd2/h2/h2_comm.c b/src/mhd2/h2/h2_comm.c @@ -267,11 +267,12 @@ h2_switch_to_h2 (struct MHD_Connection *restrict c) /** - * Perform de-initialisation of HTTP/2-specific data + * Perform de-initialisation of HTTP/2-specific data and start connection + * closing * @param c the connection to de-initialise */ MHD_INTERNAL MHD_FN_PAR_NONNULL_ALL_ void -mhd_h2_conn_deinit (struct MHD_Connection *restrict c) +mhd_h2_conn_h2_deinit_start_closing (struct MHD_Connection *restrict c) { mhd_assert (mhd_C_IS_HTTP2 (c)); mhd_assert ((mhd_HTTP_LAYER_CONNECTED == c->h_layer.state) || @@ -585,7 +586,7 @@ mhd_h2_conn_process_data (struct MHD_Connection *restrict c) { if (c->write_buffer_append_offset == c->write_buffer_send_offset) { - mhd_h2_conn_deinit (c); + mhd_h2_conn_h2_deinit_start_closing (c); return false; } return true; @@ -598,7 +599,7 @@ mhd_h2_conn_process_data (struct MHD_Connection *restrict c) (0 != (c->sk.ready & mhd_SOCKET_NET_STATE_ERROR_READY)) || (mhd_HTTP_LAYER_CLOSING == c->h_layer.state)) { - mhd_h2_conn_deinit (c); + mhd_h2_conn_h2_deinit_start_closing (c); return false; } diff --git a/src/mhd2/h2/h2_comm.h b/src/mhd2/h2/h2_comm.h @@ -90,7 +90,7 @@ mhd_h2_conn_process_data (struct MHD_Connection *restrict c) MHD_FN_PAR_NONNULL_ALL_; MHD_INTERNAL void -mhd_h2_conn_deinit (struct MHD_Connection *restrict c) +mhd_h2_conn_h2_deinit_start_closing (struct MHD_Connection *restrict c) MHD_FN_PAR_NONNULL_ALL_; #endif /* ! MHD_H2_COMM_H */ diff --git a/src/mhd2/stream_funcs.h b/src/mhd2/stream_funcs.h @@ -341,7 +341,7 @@ enum mhd_ConnCloseReason /** - * Start closing of the connection. + * Start non-HTTP/2 closing of the connection. * * Application is notified about connection closing (if callback is set), * the socket is shut downed for sending and the connection is marked for