]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stconn: remove the new unneeded SE_FL_APP_MASK
authorWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 15:03:34 +0000 (17:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:35 +0000 (19:33 +0200)
The only two places where it was used was to carefully preserve the
SE_FL_WILL_CONSUME flag (since others are irrelevant there and the
previous RXBLK* flags moved to the stconn). Now that the flag is
cleared by default there's no need to re-created a fresh new one
when replacing the descriptor, so we can eliminate that remaining
trick.

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

index 0aa2178ab770dfa3f51ef6ea3b8e5cc33683da2f..89f1009c9b19edb1385d3aa09f0cd79ced2647c0 100644 (file)
@@ -74,7 +74,6 @@ enum se_flags {
        SE_FL_WAIT_DATA     = 0x00800000,  /* stream endpoint cannot work without more data from the stream's output */
        SE_FL_WONT_CONSUME  = 0x01000000,  /* stream endpoint will not consume more data */
        SE_FL_HAVE_NO_DATA  = 0x02000000,  /* the endpoint has no more data to deliver to the stream */
-       SE_FL_APP_MASK      = 0x02e00000,  /* Mask for flags set by the app layer */
        /* unused             0x04000000,*/
        /* unused             0x08000000,*/
        /* unused             0x10000000,*/
index e1d363549059bced5064ed144739ad6166c886c9..28f77ecb86f0b2f15e2488653d0b068056290f92 100644 (file)
@@ -378,10 +378,10 @@ static void sc_detach_endp(struct stconn **scp)
        }
 
        if (sc->sedesc) {
-               /* the sc is the only one one the endpoint */
+               /* the SD wasn't used and can be recycled */
                sc->sedesc->se     = NULL;
                sc->sedesc->conn   = NULL;
-               sc_ep_clr(sc, ~SE_FL_APP_MASK);
+               sc->sedesc->flags  = 0;
                sc_ep_set(sc, SE_FL_DETACHED);
        }
 
@@ -460,7 +460,6 @@ int sc_reset_endp(struct stconn *sc)
                sc_ep_set(sc, SE_FL_ERROR);
                return -1;
        }
-       se_fl_setall(new_sd, sc_ep_get(sc) & SE_FL_APP_MASK);
 
        /* The app is still attached, the sc will not be released */
        sc_detach_endp(&sc);