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.
diff --git a/include/haproxy/stconn-t.h b/include/haproxy/stconn-t.h
index 0aa2178..89f1009 100644
--- a/include/haproxy/stconn-t.h
+++ b/include/haproxy/stconn-t.h
@@ -74,7 +74,6 @@
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,*/
diff --git a/src/stconn.c b/src/stconn.c
index e1d3635..28f77ec 100644
--- a/src/stconn.c
+++ b/src/stconn.c
@@ -378,10 +378,10 @@
}
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 @@
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);