]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-spop: Remove useless comments
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 4 Feb 2025 10:21:23 +0000 (11:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Feb 2025 10:19:32 +0000 (11:19 +0100)
Just a small cleanup to remove some comments added during the development of
the mux.

include/haproxy/mux_spop-t.h
src/mux_spop.c

index 2e6c3c5de3fd1ef056fb94647d0a356a1214fc26..59a2246138bb5b3f3c931a5e33cd296f5a8c93a1 100644 (file)
@@ -60,17 +60,12 @@ static forceinline char *spop_conn_show_flags(char *buf, size_t len, const char
 /**** SPOP stream flags (32 bit), in spop_strm->flags ****/
 #define SPOP_SF_NONE           0x00000000
 #define SPOP_SF_ACK_RCVD       0x00000001 /* ACK freme received */
-//#define SPOP_SF_ES_SENT        0x00000002 /* end-of-stream sent */
-//#define SPOP_SF_EP_SENT        0x00000004 /* end-of-param sent */
-//#define SPOP_SF_DISCON_SENT      0x00000008 /* disconnect sent */
 
 /* Stream flags indicating the reason the stream is blocked */
 #define SPOP_SF_BLK_MBUSY      0x00000010 /* blocked waiting for mux access (transient) */
 #define SPOP_SF_BLK_MROOM      0x00000020 /* blocked waiting for room in the mux */
 #define SPOP_SF_BLK_ANY        0x00000030 /* any of the reasons above */
 
-//#define SPOP_SF_BEGIN_SENT     0x00000100  /* a BEGIN_REQUEST record was sent for this stream */
-//#define SPOP_SF_OUTGOING_DATA  0x00000200  /* set whenever we've seen outgoing data */
 #define SPOP_SF_NOTIFIED       0x00000400  /* a paused stream was notified to try to send again */
 
 /* This function is used to report flags in debugging tools. Please reflect
index a1b32fcd8bac72b0f3ea14196f4000ac3c5d4e9e..bc22eef9f42246f2fb025fe61e736c8aad3a6bf2 100644 (file)
@@ -278,7 +278,7 @@ static const struct spop_strm *spop_closed_stream = &(const struct spop_strm){
         .sd        = (struct sedesc *)&closed_ep,
         .spop_conn = NULL,
         .state     = SPOP_SS_CLOSED,
-       .flags     = SPOP_SF_NONE, // TODO ?
+       .flags     = SPOP_SF_NONE,
         .id        = 0,
 };
 
@@ -1961,14 +1961,6 @@ static int spop_conn_handle_ack(struct spop_conn *spop_conn, struct spop_strm *s
        /* b_del(&spop_conn->dbuf, sent); */
        spop_conn->dfl -= sent;
 
-       // TODO: may happen or not ?
-       /* /\* call the upper layers to process the frame, then let the upper layer */
-       /*  * notify the stream about any change. */
-       /*  *\/ */
-       /* if (!spop_strm_sc(spop_strm)) { */
-       /*      /\* The upper layer has already closed *\/ */
-
-       /* } */
        if (spop_strm->state == SPOP_SS_OPEN)
                spop_strm->state = SPOP_SS_HREM;
        else
@@ -2612,8 +2604,7 @@ static int spop_process(struct spop_conn *spop_conn)
        }
 
        if ((spop_conn->flags & SPOP_CF_ERROR) || spop_conn_read0_pending(spop_conn) ||
-           spop_conn->state == SPOP_CS_CLOSED || (spop_conn->flags & SPOP_CF_DISCO_FAILED) /* || */
-           /* TODO: no sure ? eb_is_empty(&spop_conn->streams_by_id) */) {
+           spop_conn->state == SPOP_CS_CLOSED || (spop_conn->flags & SPOP_CF_DISCO_FAILED)) {
                spop_wake_some_streams(spop_conn, 0);
 
                if (eb_is_empty(&spop_conn->streams_by_id)) {
@@ -2910,7 +2901,7 @@ static void spop_detach(struct sedesc *sd)
        /* this stream may be blocked waiting for some data to leave, so orphan
         * it in this case.
         */
-       if (!(spop_conn->flags & (SPOP_CF_ERR_PENDING|SPOP_CF_ERROR)) && // FIXME: Be sure for ERR_PENDING
+       if (!(spop_conn->flags & (SPOP_CF_ERR_PENDING|SPOP_CF_ERROR)) &&
            (spop_conn->state != SPOP_CS_CLOSED) &&
            (spop_strm->flags & (SPOP_SF_BLK_MBUSY|SPOP_SF_BLK_MROOM)) &&
            spop_strm->subs) {
@@ -3257,7 +3248,7 @@ static size_t spop_rcv_buf(struct stconn *sc, struct buffer *buf, size_t count,
                }
        }
 
-       if (ret && spop_conn->dsi == spop_strm->id) { // TODO must match the frame id too !!!!
+       if (ret && spop_conn->dsi == spop_strm->id) {
                /* demux is blocking on this stream's buffer */
                spop_conn->flags &= ~SPOP_CF_DEM_SFULL;
                spop_conn_restart_reading(spop_conn, 1);