CLEANUP: stconn: rename cs_conn_mux() to sc_mux_ops()
This effectively returns the mux_ops from the connection when it exists
on an stconn.
diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h
index 3d12b58..aa186b3 100644
--- a/include/haproxy/conn_stream.h
+++ b/include/haproxy/conn_stream.h
@@ -145,10 +145,10 @@
return NULL;
}
-/* Returns the mux ops of the connection from a cs if the endpoint is a
+/* Returns the mux ops of the connection from an stconn if the endpoint is a
* mux stream. Otherwise NULL is returned.
*/
-static inline const struct mux_ops *cs_conn_mux(const struct stconn *cs)
+static inline const struct mux_ops *sc_mux_ops(const struct stconn *cs)
{
const struct connection *conn = sc_conn(cs);
@@ -233,7 +233,7 @@
return;
/* clean data-layer shutdown */
- mux = cs_conn_mux(cs);
+ mux = sc_mux_ops(cs);
if (mux && mux->shutr)
mux->shutr(cs, mode);
sc_ep_set(cs, (mode == CO_SHR_DRAIN) ? SE_FL_SHRD : SE_FL_SHRR);
@@ -250,7 +250,7 @@
return;
/* clean data-layer shutdown */
- mux = cs_conn_mux(cs);
+ mux = sc_mux_ops(cs);
if (mux && mux->shutw)
mux->shutw(cs, mode);
sc_ep_set(cs, (mode == CO_SHW_NORMAL) ? SE_FL_SHWN : SE_FL_SHWS);
diff --git a/src/conn_stream.c b/src/conn_stream.c
index 06b1473..b2c45f8 100644
--- a/src/conn_stream.c
+++ b/src/conn_stream.c
@@ -1622,7 +1622,7 @@
if (!cs_state_in(cs->state, SC_SB_RDY|SC_SB_EST))
return 0;
- if (!cs_conn_mux(cs))
+ if (!sc_mux_ops(cs))
return 0; // only stconns are supported
if (cs->wait_event.events & SUB_RETRY_RECV)
@@ -1800,7 +1800,7 @@
if (!cs_state_in(cs->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
return;
- if (!cs_conn_mux(cs))
+ if (!sc_mux_ops(cs))
return;
cs_conn_send(cs);
diff --git a/src/stream.c b/src/stream.c
index 51e18d3..e8f9c91 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -278,7 +278,7 @@
int stream_upgrade_from_cs(struct stconn *cs, struct buffer *input)
{
struct stream *s = __sc_strm(cs);
- const struct mux_ops *mux = cs_conn_mux(cs);
+ const struct mux_ops *mux = sc_mux_ops(cs);
if (mux) {
if (mux->flags & MX_FL_HTX)
@@ -466,7 +466,7 @@
if (sc_ep_test(cs, SE_FL_WEBSOCKET))
s->flags |= SF_WEBSOCKET;
if (sc_conn(cs)) {
- const struct mux_ops *mux = cs_conn_mux(cs);
+ const struct mux_ops *mux = sc_mux_ops(cs);
if (mux && mux->flags & MX_FL_HTX)
s->flags |= SF_HTX;