CLEANUP: muxes: rename "get_first_cs" to "get_first_sc"
This is renamed both in the mux_ops descriptor and the mux functions
themselves to accommodate the new type name.
diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h
index 1f12afb..87941eb 100644
--- a/include/haproxy/connection-t.h
+++ b/include/haproxy/connection-t.h
@@ -397,7 +397,7 @@
void (*shutw)(struct stconn *cs, enum co_shw_mode); /* shutw function */
int (*attach)(struct connection *conn, struct sedesc *, struct session *sess); /* attach a stconn to an outgoing connection */
- struct stconn *(*get_first_cs)(const struct connection *); /* retrieves any valid stconn from this connection */
+ struct stconn *(*get_first_sc)(const struct connection *); /* retrieves any valid stconn from this connection */
void (*detach)(struct sedesc *); /* Detach an stconn from the stdesc from an outgoing connection, when the request is done */
int (*show_fd)(struct buffer *, struct connection *); /* append some data about connection into chunk for "show fd"; returns non-zero if suspicious */
int (*subscribe)(struct stconn *cs, int event_type, struct wait_event *es); /* Subscribe <es> to events, such as "being able to send" */
diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h
index 8d99ca2..90b47b5 100644
--- a/include/haproxy/connection.h
+++ b/include/haproxy/connection.h
@@ -498,7 +498,7 @@
* connection for purposes like source binding or proxy protocol header
* emission. In such cases, any stream connector is expected to be valid so the
* mux is encouraged to return the first one it finds. If the connection has
- * no mux or the mux has no get_first_cs() method or the mux has no valid
+ * no mux or the mux has no get_first_sc() method or the mux has no valid
* stream connector, NULL is returned. The output pointer is purposely marked
* const to discourage the caller from modifying anything there.
*/
@@ -506,9 +506,9 @@
{
BUG_ON(!conn || !conn->mux);
- if (!conn->mux->get_first_cs)
+ if (!conn->mux->get_first_sc)
return NULL;
- return conn->mux->get_first_cs(conn);
+ return conn->mux->get_first_sc(conn);
}
int conn_update_alpn(struct connection *conn, const struct ist alpn, int force);
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index f38a475..70f9d02 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -3554,7 +3554,7 @@
* beneficial to scan backwards from the end to reduce the likeliness to find
* orphans.
*/
-static struct stconn *fcgi_get_first_cs(const struct connection *conn)
+static struct stconn *fcgi_get_first_sc(const struct connection *conn)
{
struct fcgi_conn *fconn = conn->ctx;
struct fcgi_strm *fstrm;
@@ -4280,7 +4280,7 @@
.init = fcgi_init,
.wake = fcgi_wake,
.attach = fcgi_attach,
- .get_first_cs = fcgi_get_first_cs,
+ .get_first_sc = fcgi_get_first_sc,
.detach = fcgi_detach,
.destroy = fcgi_destroy,
.avail_streams = fcgi_avail_streams,
diff --git a/src/mux_h1.c b/src/mux_h1.c
index 1985006..8be703b 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -3340,7 +3340,7 @@
/* Retrieves a valid stream connector from this connection, or returns NULL.
* For this mux, it's easy as we can only store a single stream connector.
*/
-static struct stconn *h1_get_first_cs(const struct connection *conn)
+static struct stconn *h1_get_first_sc(const struct connection *conn)
{
struct h1c *h1c = conn->ctx;
struct h1s *h1s = h1c->h1s;
@@ -4205,7 +4205,7 @@
.init = h1_init,
.wake = h1_wake,
.attach = h1_attach,
- .get_first_cs = h1_get_first_cs,
+ .get_first_sc = h1_get_first_sc,
.detach = h1_detach,
.destroy = h1_destroy,
.avail_streams = h1_avail_streams,
@@ -4231,7 +4231,7 @@
.init = h1_init,
.wake = h1_wake,
.attach = h1_attach,
- .get_first_cs = h1_get_first_cs,
+ .get_first_sc = h1_get_first_sc,
.detach = h1_detach,
.destroy = h1_destroy,
.avail_streams = h1_avail_streams,
diff --git a/src/mux_h2.c b/src/mux_h2.c
index c405ea6..3ba4652 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -4320,7 +4320,7 @@
* beneficial to scan backwards from the end to reduce the likeliness to find
* orphans.
*/
-static struct stconn *h2_get_first_cs(const struct connection *conn)
+static struct stconn *h2_get_first_sc(const struct connection *conn)
{
struct h2c *h2c = conn->ctx;
struct h2s *h2s;
@@ -6928,7 +6928,7 @@
.subscribe = h2_subscribe,
.unsubscribe = h2_unsubscribe,
.attach = h2_attach,
- .get_first_cs = h2_get_first_cs,
+ .get_first_sc = h2_get_first_sc,
.detach = h2_detach,
.destroy = h2_destroy,
.avail_streams = h2_avail_streams,
diff --git a/src/mux_pt.c b/src/mux_pt.c
index 7e119a0..590e166 100644
--- a/src/mux_pt.c
+++ b/src/mux_pt.c
@@ -398,7 +398,7 @@
/* Retrieves a valid stream connector from this connection, or returns NULL.
* For this mux, it's easy as we can only store a single stream connector.
*/
-static struct stconn *mux_pt_get_first_cs(const struct connection *conn)
+static struct stconn *mux_pt_get_first_sc(const struct connection *conn)
{
struct mux_pt_ctx *ctx = conn->ctx;
@@ -662,7 +662,7 @@
.snd_pipe = mux_pt_snd_pipe,
#endif
.attach = mux_pt_attach,
- .get_first_cs = mux_pt_get_first_cs,
+ .get_first_sc = mux_pt_get_first_sc,
.detach = mux_pt_detach,
.avail_streams = mux_pt_avail_streams,
.used_streams = mux_pt_used_streams,
@@ -687,7 +687,7 @@
.snd_pipe = mux_pt_snd_pipe,
#endif
.attach = mux_pt_attach,
- .get_first_cs = mux_pt_get_first_cs,
+ .get_first_sc = mux_pt_get_first_sc,
.detach = mux_pt_detach,
.avail_streams = mux_pt_avail_streams,
.used_streams = mux_pt_used_streams,