CLEANUP: stdesc: rename the stream connector ->cs field to ->sc
This is a rename of this field. Most of the places were in muxes, but
were already factored with the previous series adding *_sc().
diff --git a/include/haproxy/applet.h b/include/haproxy/applet.h
index 8230955..dcf69da 100644
--- a/include/haproxy/applet.h
+++ b/include/haproxy/applet.h
@@ -115,7 +115,7 @@
/* returns the stream connector the appctx is attached to, via the sedesc */
static inline struct stconn *appctx_cs(const struct appctx *appctx)
{
- return appctx->sedesc->cs;
+ return appctx->sedesc->sc;
}
/* returns the stream the appctx is attached to. Note that a stream *must*
@@ -123,7 +123,7 @@
*/
static inline struct stream *appctx_strm(const struct appctx *appctx)
{
- return __cs_strm(appctx->sedesc->cs);
+ return __cs_strm(appctx->sedesc->sc);
}
#endif /* _HAPROXY_APPLET_H */
diff --git a/include/haproxy/conn_stream-t.h b/include/haproxy/conn_stream-t.h
index 7939302..c2f3f9c 100644
--- a/include/haproxy/conn_stream-t.h
+++ b/include/haproxy/conn_stream-t.h
@@ -163,13 +163,13 @@
*
* <se> is the stream endpoint, i.e. the mux stream or the appctx
* <conn> is the connection for connection-based streams
- * <cs> is the stream connector we're attached to, or NULL
+ * <sc> is the stream connector we're attached to, or NULL
* <flags> SE_FL_*
*/
struct sedesc {
void *se;
struct connection *conn;
- struct stconn *cs;
+ struct stconn *sc;
unsigned int flags;
};
diff --git a/include/haproxy/mux_quic.h b/include/haproxy/mux_quic.h
index 4ea36e2..11da819 100644
--- a/include/haproxy/mux_quic.h
+++ b/include/haproxy/mux_quic.h
@@ -118,7 +118,7 @@
sess->t_handshake = 0;
sess->t_idle = 0;
- return qcs->endp->cs;
+ return qcs->endp->sc;
}
#endif /* USE_QUIC */
diff --git a/src/conn_stream.c b/src/conn_stream.c
index 490f856..8b22c4a 100644
--- a/src/conn_stream.c
+++ b/src/conn_stream.c
@@ -86,7 +86,7 @@
{
sedesc->se = NULL;
sedesc->conn = NULL;
- sedesc->cs = NULL;
+ sedesc->sc = NULL;
se_fl_setall(sedesc, SE_FL_NONE);
}
@@ -143,7 +143,7 @@
goto alloc_error;
}
cs->sedesc = sedesc;
- sedesc->cs = cs;
+ sedesc->sc = cs;
return cs;
@@ -354,7 +354,7 @@
if (cs->wait_event.events != 0)
conn->mux->unsubscribe(cs, cs->wait_event.events, &cs->wait_event);
se_fl_set(sedesc, SE_FL_ORPHAN);
- sedesc->cs = NULL;
+ sedesc->sc = NULL;
cs->sedesc = NULL;
conn->mux->detach(sedesc);
}
@@ -373,7 +373,7 @@
struct appctx *appctx = __cs_appctx(cs);
sc_ep_set(cs, SE_FL_ORPHAN);
- cs->sedesc->cs = NULL;
+ cs->sedesc->sc = NULL;
cs->sedesc = NULL;
appctx_shut(appctx);
appctx_free(appctx);
@@ -467,7 +467,7 @@
cs_detach_endp(&cs);
BUG_ON(cs->sedesc);
cs->sedesc = new_endp;
- cs->sedesc->cs = cs;
+ cs->sedesc->sc = cs;
sc_ep_set(cs, SE_FL_DETACHED);
return 0;
}
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index 8dcb8ef..7a7ea25 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -372,7 +372,7 @@
/* a dummy closed endpoint */
static const struct sedesc closed_ep = {
- . cs = NULL,
+ .sc = NULL,
.flags = SE_FL_DETACHED,
};
@@ -425,7 +425,7 @@
/* returns the stconn associated to the FCGI stream */
static forceinline struct stconn *fcgi_strm_sc(const struct fcgi_strm *fstrm)
{
- return fstrm->endp->cs;
+ return fstrm->endp->sc;
}
@@ -3533,7 +3533,7 @@
struct fcgi_conn *fconn = conn->ctx;
TRACE_ENTER(FCGI_EV_FSTRM_NEW, conn);
- fstrm = fcgi_stconn_new(fconn, endp->cs, sess);
+ fstrm = fcgi_stconn_new(fconn, endp->sc, sess);
if (!fstrm)
goto err;
diff --git a/src/mux_h1.c b/src/mux_h1.c
index 74eeca1..f0f4372 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -367,7 +367,7 @@
/* returns the stconn associated to the H1 stream */
static forceinline struct stconn *h1s_sc(const struct h1s *h1s)
{
- return h1s->endp->cs;
+ return h1s->endp->sc;
}
/* the H1 traces always expect that arg1, if non-null, is of type connection
@@ -3320,7 +3320,7 @@
goto err;
}
- h1s = h1c_bck_stream_new(h1c, endp->cs, sess);
+ h1s = h1c_bck_stream_new(h1c, endp->sc, sess);
if (h1s == NULL) {
TRACE_ERROR("h1s creation failure", H1_EV_STRM_NEW|H1_EV_STRM_END|H1_EV_STRM_ERR, conn);
goto err;
diff --git a/src/mux_h2.c b/src/mux_h2.c
index f11863c..132ecb7 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -524,7 +524,7 @@
/* a dummy closed endpoint */
static const struct sedesc closed_ep = {
- . cs = NULL,
+ .sc = NULL,
.flags = SE_FL_DETACHED,
};
@@ -615,7 +615,7 @@
/* returns the stconn associated to the H2 stream */
static forceinline struct stconn *h2s_sc(const struct h2s *h2s)
{
- return h2s->endp->cs;
+ return h2s->endp->sc;
}
/* the H2 traces always expect that arg1, if non-null, is of type connection
@@ -4301,7 +4301,7 @@
struct h2c *h2c = conn->ctx;
TRACE_ENTER(H2_EV_H2S_NEW, conn);
- h2s = h2c_bck_stream_new(h2c, endp->cs, sess);
+ h2s = h2c_bck_stream_new(h2c, endp->sc, sess);
if (!h2s) {
TRACE_DEVEL("leaving on stream creation failure", H2_EV_H2S_NEW|H2_EV_H2S_ERR, conn);
return -1;
diff --git a/src/mux_pt.c b/src/mux_pt.c
index 4ae403d..fefccd9 100644
--- a/src/mux_pt.c
+++ b/src/mux_pt.c
@@ -94,7 +94,7 @@
/* returns the stconn associated to the stream */
static forceinline struct stconn *pt_sc(const struct mux_pt_ctx *pt)
{
- return pt->endp->cs;
+ return pt->endp->sc;
}
static inline void pt_trace_buf(const struct buffer *buf, size_t ofs, size_t len)
@@ -386,12 +386,12 @@
TRACE_ENTER(PT_EV_STRM_NEW, conn);
if (ctx->wait_event.events)
conn->xprt->unsubscribe(ctx->conn, conn->xprt_ctx, SUB_RETRY_RECV, &ctx->wait_event);
- if (cs_attach_mux(endp->cs, ctx, conn) < 0)
+ if (cs_attach_mux(endp->sc, ctx, conn) < 0)
return -1;
ctx->endp = endp;
se_fl_set(ctx->endp, SE_FL_RCV_MORE);
- TRACE_LEAVE(PT_EV_STRM_NEW, conn, endp->cs);
+ TRACE_LEAVE(PT_EV_STRM_NEW, conn, endp->sc);
return 0;
}
@@ -428,7 +428,7 @@
struct connection *conn = endp->conn;
struct mux_pt_ctx *ctx;
- TRACE_ENTER(PT_EV_STRM_END, conn, endp->cs);
+ TRACE_ENTER(PT_EV_STRM_END, conn, endp->sc);
ctx = conn->ctx;
@@ -438,7 +438,7 @@
conn->xprt->subscribe(conn, conn->xprt_ctx, SUB_RETRY_RECV, &ctx->wait_event);
} else {
/* There's no session attached to that connection, destroy it */
- TRACE_DEVEL("killing dead connection", PT_EV_STRM_END, conn, endp->cs);
+ TRACE_DEVEL("killing dead connection", PT_EV_STRM_END, conn, endp->sc);
mux_pt_destroy(ctx);
}
diff --git a/src/mux_quic.c b/src/mux_quic.c
index 0fcfe03..e0036c0 100644
--- a/src/mux_quic.c
+++ b/src/mux_quic.c
@@ -1582,7 +1582,7 @@
node = eb64_next(node)) {
qcs = eb64_entry(node, struct qcs, by_id);
- if (!qcs->endp || !qcs->endp->cs)
+ if (!qcs->endp || !qcs->endp->sc)
continue;
if (qcc->conn->flags & CO_FL_ERROR) {
@@ -1594,8 +1594,8 @@
qcs_notify_recv(qcs);
qcs_notify_send(qcs);
}
- else if (qcs->endp->cs->data_cb->wake) {
- qcs->endp->cs->data_cb->wake(qcs->endp->cs);
+ else if (qcs->endp->sc->data_cb->wake) {
+ qcs->endp->sc->data_cb->wake(qcs->endp->sc);
}
}
}