libmicrohttpd2

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

commit 3e3c0110043bdddbc8678918b556b8439f612ba6
parent 5540b4ef4df6d8a2905f12c3cf17c51937015749
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Fri, 26 Dec 2025 11:53:42 +0100

Connection timeouts: optimised list manipulation

Diffstat:
Msrc/mhd2/conn_timeout.c | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/mhd2/conn_timeout.c b/src/mhd2/conn_timeout.c @@ -204,11 +204,8 @@ mhd_conn_update_activity_mark (struct MHD_Connection *restrict c) if (c->timeout.in_cstm_tmout_list) return; /* custom timeout, no need to move it in "normal" DLL */ - /* move connection to head of timeout list (by remove + add operation) */ - mhd_DLINKEDL_DEL_D (&(d->conns.def_timeout), - c, - timeout.tmout_list); - mhd_DLINKEDL_INS_FIRST_D (&(d->conns.def_timeout), - c, - timeout.tmout_list); + /* move connection to head of timeout list */ + mhd_DLINKEDL_MOVE_TO_FIRST_D (&(d->conns.def_timeout), + c, + timeout.tmout_list); }