CLEANUP: conn_stream: rename the stream endpoint flags CS_EP_* to SE_FL_*
Let's now use the new flag names for the stream endpoint.
diff --git a/src/stream.c b/src/stream.c
index 33d6da8..d5e2d8a 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -304,7 +304,7 @@
/* Callback used to wake up a stream when an input buffer is available. The
* stream <s>'s conn-streams are checked for a failed buffer allocation
- * as indicated by the presence of the CS_EP_RXBLK_ROOM flag and the lack of a
+ * as indicated by the presence of the SE_FL_RXBLK_ROOM flag and the lack of a
* buffer, and and input buffer is assigned there (at most one). The function
* returns 1 and wakes the stream up if a buffer was taken, otherwise zero.
* It's designed to be called from __offer_buffer().
@@ -313,10 +313,10 @@
{
struct stream *s = arg;
- if (!s->req.buf.size && !s->req.pipe && sc_ep_test(s->csf, CS_EP_RXBLK_BUFF) &&
+ if (!s->req.buf.size && !s->req.pipe && sc_ep_test(s->csf, SE_FL_RXBLK_BUFF) &&
b_alloc(&s->req.buf))
cs_rx_buff_rdy(s->csf);
- else if (!s->res.buf.size && !s->res.pipe && sc_ep_test(s->csb, CS_EP_RXBLK_BUFF) &&
+ else if (!s->res.buf.size && !s->res.pipe && sc_ep_test(s->csb, SE_FL_RXBLK_BUFF) &&
b_alloc(&s->res.buf))
cs_rx_buff_rdy(s->csb);
else
@@ -463,7 +463,7 @@
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
s->csb->flags |= CS_FL_INDEP_STR;
- if (sc_ep_test(cs, CS_EP_WEBSOCKET))
+ if (sc_ep_test(cs, SE_FL_WEBSOCKET))
s->flags |= SF_WEBSOCKET;
if (cs_conn(cs)) {
const struct mux_ops *mux = cs_conn_mux(cs);
@@ -886,7 +886,7 @@
s->flags &= ~SF_CONN_EXP;
/* errors faced after sending data need to be reported */
- if (sc_ep_test(s->csb, CS_EP_ERROR) && req->flags & CF_WROTE_DATA) {
+ if (sc_ep_test(s->csb, SE_FL_ERROR) && req->flags & CF_WROTE_DATA) {
/* Don't add CF_WRITE_ERROR if we're here because
* early data were rejected by the server, or
* http_wait_for_response() will never be called
@@ -1716,7 +1716,7 @@
(CF_SHUTR|CF_READ_ACTIVITY|CF_READ_TIMEOUT|CF_SHUTW|
CF_WRITE_ACTIVITY|CF_WRITE_TIMEOUT|CF_ANA_TIMEOUT)) &&
!(s->flags & SF_CONN_EXP) &&
- !((sc_ep_get(csf) | csb->flags) & CS_EP_ERROR) &&
+ !((sc_ep_get(csf) | csb->flags) & SE_FL_ERROR) &&
((s->pending_events & TASK_WOKEN_ANY) == TASK_WOKEN_TIMER)) {
csf->flags &= ~CS_FL_DONT_WAKE;
csb->flags &= ~CS_FL_DONT_WAKE;
@@ -1735,10 +1735,10 @@
* must be be reviewed too.
*/
if (!stream_alloc_work_buffer(s)) {
- sc_ep_set(s->csf, CS_EP_ERROR);
+ sc_ep_set(s->csf, SE_FL_ERROR);
s->conn_err_type = STRM_ET_CONN_RES;
- sc_ep_set(s->csb, CS_EP_ERROR);
+ sc_ep_set(s->csb, SE_FL_ERROR);
s->conn_err_type = STRM_ET_CONN_RES;
if (!(s->flags & SF_ERR_MASK))
@@ -1754,7 +1754,7 @@
* connection setup code must be able to deal with any type of abort.
*/
srv = objt_server(s->target);
- if (unlikely(sc_ep_test(csf, CS_EP_ERROR))) {
+ if (unlikely(sc_ep_test(csf, SE_FL_ERROR))) {
if (cs_state_in(csf->state, CS_SB_EST|CS_SB_DIS)) {
cs_shutr(csf);
cs_shutw(csf);
@@ -1774,7 +1774,7 @@
}
}
- if (unlikely(sc_ep_test(csb, CS_EP_ERROR))) {
+ if (unlikely(sc_ep_test(csb, SE_FL_ERROR))) {
if (cs_state_in(csb->state, CS_SB_EST|CS_SB_DIS)) {
cs_shutr(csb);
cs_shutw(csb);
@@ -2328,8 +2328,8 @@
/* Benchmarks have shown that it's optimal to do a full resync now */
if (csf->state == CS_ST_DIS ||
cs_state_in(csb->state, CS_SB_RDY|CS_SB_DIS) ||
- (sc_ep_test(csf, CS_EP_ERROR) && csf->state != CS_ST_CLO) ||
- (sc_ep_test(csb, CS_EP_ERROR) && csb->state != CS_ST_CLO))
+ (sc_ep_test(csf, SE_FL_ERROR) && csf->state != CS_ST_CLO) ||
+ (sc_ep_test(csb, SE_FL_ERROR) && csb->state != CS_ST_CLO))
goto resync_conn_stream;
/* otherwise we want to check if we need to resync the req buffer or not */
@@ -2452,8 +2452,8 @@
if (csf->state == CS_ST_DIS ||
cs_state_in(csb->state, CS_SB_RDY|CS_SB_DIS) ||
- (sc_ep_test(csf, CS_EP_ERROR) && csf->state != CS_ST_CLO) ||
- (sc_ep_test(csb, CS_EP_ERROR) && csb->state != CS_ST_CLO))
+ (sc_ep_test(csf, SE_FL_ERROR) && csf->state != CS_ST_CLO) ||
+ (sc_ep_test(csb, SE_FL_ERROR) && csb->state != CS_ST_CLO))
goto resync_conn_stream;
if ((req->flags & ~rqf_last) & CF_MASK_ANALYSER)
@@ -3307,9 +3307,8 @@
csf = strm->csf;
chunk_appendf(&trash, " csf=%p flags=0x%08x state=%s endp=%s,%p,0x%08x sub=%d\n",
csf, csf->flags, cs_state_str(csf->state),
- (sc_ep_test(csf, CS_EP_T_MUX) ? "CONN" : (sc_ep_test(csf, CS_EP_T_APPLET) ? "APPCTX" : "NONE")),
- csf->endp->target, sc_ep_get(csf),
- csf->wait_event.events);
+ (sc_ep_test(csf, SE_FL_T_MUX) ? "CONN" : (sc_ep_test(csf, SE_FL_T_APPLET) ? "APPCTX" : "NONE")),
+ csf->endp->target, sc_ep_get(csf), csf->wait_event.events);
if ((conn = cs_conn(csf)) != NULL) {
chunk_appendf(&trash,
@@ -3347,9 +3346,9 @@
csb = strm->csb;
chunk_appendf(&trash, " csb=%p flags=0x%08x state=%s endp=%s,%p,0x%08x sub=%d\n",
csb, csb->flags, cs_state_str(csb->state),
- (sc_ep_test(csb, CS_EP_T_MUX) ? "CONN" : (sc_ep_test(csb, CS_EP_T_APPLET) ? "APPCTX" : "NONE")),
- csb->endp->target, sc_ep_get(csb),
- csb->wait_event.events);
+ (sc_ep_test(csb, SE_FL_T_MUX) ? "CONN" : (sc_ep_test(csb, SE_FL_T_APPLET) ? "APPCTX" : "NONE")),
+ csb->endp->target, sc_ep_get(csb), csb->wait_event.events);
+
if ((conn = cs_conn(csb)) != NULL) {
chunk_appendf(&trash,
" co1=%p ctrl=%s xprt=%s mux=%s data=%s target=%s:%p\n",