From 16446de17ca61072880652b0a51aea233f0eb42c Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 26 May 2026 18:20:01 +0200 Subject: [PATCH] CLEANUP: mux-fcgi/mux-spop: Remove copy/pasted comment about slow realign A comment about the condition to perform a slow realign of the demux buffer was abusively copy/pasted from the FCGI multiplexer at different places in the FCGI and SPOP multiplexers. Let's remove these comments. --- src/mux_fcgi.c | 7 +------ src/mux_spop.c | 16 +++------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 88cbd18b1..c956b58ad 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -2516,13 +2516,8 @@ static int fcgi_strm_handle_end_request(struct fcgi_conn *fconn, struct fcgi_str return 0; } - if (unlikely(b_contig_data(dbuf, 0) < fconn->drl)) { - /* Realign the dmux buffer if the record wraps. It is unexpected - * at this stage because it should be the first record received - * from the FCGI application. - */ + if (unlikely(b_contig_data(dbuf, 0) < fconn->drl)) b_slow_realign_ofs(dbuf, trash.area, 0); - } inbuf = b_make(b_head(dbuf), b_data(dbuf), 0, fconn->drl); diff --git a/src/mux_spop.c b/src/mux_spop.c index 380384ed1..df2ca5f62 100644 --- a/src/mux_spop.c +++ b/src/mux_spop.c @@ -1655,7 +1655,7 @@ static int spop_conn_handle_hello(struct spop_conn *spop_conn) if (unlikely(b_contig_data(dbuf, 0) < spop_conn->dfl)) { /* Realign the dmux buffer if the frame wraps. It is unexpected * at this stage because it should be the first record received - * from the FCGI application. + * from the SPOA. */ b_slow_realign_ofs(dbuf, trash.area, 0); } @@ -1824,13 +1824,8 @@ static int spop_conn_handle_disconnect(struct spop_conn *spop_conn) return 0; } - if (unlikely(b_contig_data(dbuf, 0) < spop_conn->dfl)) { - /* Realign the dmux buffer if the frame wraps. It is unexpected - * at this stage because it should be the first record received - * from the FCGI application. - */ + if (unlikely(b_contig_data(dbuf, 0) < spop_conn->dfl)) b_slow_realign_ofs(dbuf, trash.area, 0); - } p = b_head(dbuf); end = p + spop_conn->dfl; @@ -1936,13 +1931,8 @@ static int spop_conn_handle_ack(struct spop_conn *spop_conn, struct spop_strm *s return 0; } - if (unlikely(b_contig_data(dbuf, 0) < spop_conn->dfl)) { - /* Realign the dmux buffer if the frame wraps. It is unexpected - * at this stage because it should be the first record received - * from the FCGI application. - */ + if (unlikely(b_contig_data(dbuf, 0) < spop_conn->dfl)) b_slow_realign_ofs(dbuf, trash.area, 0); - } spop_conn->flags &= ~SPOP_CF_DEM_SFULL; rxbuf = spop_get_buf(spop_conn, &spop_strm->rxbuf);