From: Willy Tarreau Date: Fri, 27 May 2022 09:11:15 +0000 (+0200) Subject: CLEANUP: stream: rename stream_upgrade_from_cs() to stream_upgrade_from_sc() X-Git-Tag: v2.6-dev12~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df1a2fc234388e61749f59ab652ad06ef78d961c;p=thirdparty%2Fhaproxy.git CLEANUP: stream: rename stream_upgrade_from_cs() to stream_upgrade_from_sc() It upgrades the protocol on a stream connector, let's update the name. --- diff --git a/include/haproxy/stream.h b/include/haproxy/stream.h index 94e89b40cd..f72a923ce4 100644 --- a/include/haproxy/stream.h +++ b/include/haproxy/stream.h @@ -61,7 +61,7 @@ extern struct data_cb sess_conn_cb; struct stream *stream_new(struct session *sess, struct stconn *sc, struct buffer *input); void stream_free(struct stream *s); -int stream_upgrade_from_cs(struct stconn *sc, struct buffer *input); +int stream_upgrade_from_sc(struct stconn *sc, struct buffer *input); int stream_set_http_mode(struct stream *s, const struct mux_proto_list *mux_proto); /* kill a stream and set the termination flags to (one of SF_ERR_*) */ diff --git a/src/mux_h1.c b/src/mux_h1.c index 72bdf588b2..a7e08f2608 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -753,7 +753,7 @@ static struct stconn *h1s_upgrade_sc(struct h1s *h1s, struct buffer *input) { TRACE_ENTER(H1_EV_STRM_NEW, h1s->h1c->conn, h1s); - if (stream_upgrade_from_cs(h1s_sc(h1s), input) < 0) { + if (stream_upgrade_from_sc(h1s_sc(h1s), input) < 0) { TRACE_ERROR("stream upgrade failure", H1_EV_STRM_NEW|H1_EV_STRM_END|H1_EV_STRM_ERR, h1s->h1c->conn, h1s); goto err; } diff --git a/src/stream.c b/src/stream.c index 127a5ab72c..25dcc4e2d6 100644 --- a/src/stream.c +++ b/src/stream.c @@ -275,7 +275,7 @@ static void strm_trace(enum trace_level level, uint64_t mask, const struct trace * BUF_NULL. On error, it is unchanged and it is the caller responsibility to * release it (this never happens for now). */ -int stream_upgrade_from_cs(struct stconn *sc, struct buffer *input) +int stream_upgrade_from_sc(struct stconn *sc, struct buffer *input) { struct stream *s = __sc_strm(sc); const struct mux_ops *mux = sc_mux_ops(sc);