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.
This commit is contained in:
parent
cb086c6de1
commit
d137353ae3
@ -397,7 +397,7 @@ struct mux_ops {
|
||||
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" */
|
||||
|
@ -498,7 +498,7 @@ static inline int conn_install_mux(struct connection *conn, const struct mux_ops
|
||||
* 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 @@ static inline struct stconn *conn_get_first_sc(const struct connection *conn)
|
||||
{
|
||||
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);
|
||||
|
@ -3554,7 +3554,7 @@ static int fcgi_attach(struct connection *conn, struct sedesc *endp, struct sess
|
||||
* 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 @@ static const struct mux_ops mux_fcgi_ops = {
|
||||
.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,
|
||||
|
@ -3340,7 +3340,7 @@ static int h1_attach(struct connection *conn, struct sedesc *endp, struct sessio
|
||||
/* 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 @@ static const struct mux_ops mux_http_ops = {
|
||||
.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 @@ static const struct mux_ops mux_h1_ops = {
|
||||
.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,
|
||||
|
@ -4320,7 +4320,7 @@ static int h2_attach(struct connection *conn, struct sedesc *endp, struct sessio
|
||||
* 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 @@ static const struct mux_ops h2_ops = {
|
||||
.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,
|
||||
|
@ -398,7 +398,7 @@ static int mux_pt_attach(struct connection *conn, struct sedesc *endp, struct se
|
||||
/* 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 @@ const struct mux_ops mux_tcp_ops = {
|
||||
.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 @@ const struct mux_ops mux_pt_ops = {
|
||||
.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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user