]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-fcgi/mux-spop: Remove copy/pasted comment about slow realign
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 May 2026 16:20:01 +0000 (18:20 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 May 2026 16:28:07 +0000 (18:28 +0200)
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
src/mux_spop.c

index 88cbd18b17f661e09cd09d953e94f0b1ee912cf5..c956b58add56155ff509159137d7024f5a7af0ca 100644 (file)
@@ -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);
 
index 380384ed12763f12e5521abc97b312c3baf65ab9..df2ca5f6252945c41349742070627b71f455ff19 100644 (file)
@@ -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);