CLEANUP: stconn: remove the new unneeded SE_FL_APP_MASK

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.
This commit is contained in:
Willy Tarreau 2022-05-27 17:03:34 +02:00
parent 369d5aa208
commit da59c895b9
2 changed files with 2 additions and 4 deletions

View 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,*/

View 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);