From fa57cc7b20f1ad9c6c437ca6cce6cc8f2438b687 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 18 May 2022 17:56:13 +0200 Subject: [PATCH] CLEANUP: stconn: rename __cs_endp_target() to __sc_endp() The function returns the real stream endpoint so since there's no more confusion around the terminology, let's drop "target". --- include/haproxy/conn_stream.h | 8 ++++---- src/conn_stream.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index a7c9e3609..ce0e673ba 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -124,8 +124,8 @@ static forceinline uint sc_ep_get(const struct stconn *sc) } -/* Returns the endpoint target without any control */ -static inline void *__cs_endp_target(const struct stconn *cs) +/* Returns the stream endpoint from an connector, without any control */ +static inline void *__sc_endp(const struct stconn *cs) { return cs->sedesc->se; } @@ -161,7 +161,7 @@ static inline const struct mux_ops *sc_mux_ops(const struct stconn *cs) */ static inline void *__sc_mux_strm(const struct stconn *cs) { - return __cs_endp_target(cs); + return __sc_endp(cs); } static inline struct appctx *sc_mux_strm(const struct stconn *cs) { @@ -176,7 +176,7 @@ static inline struct appctx *sc_mux_strm(const struct stconn *cs) */ static inline struct appctx *__sc_appctx(const struct stconn *cs) { - return __cs_endp_target(cs); + return __sc_endp(cs); } static inline struct appctx *sc_appctx(const struct stconn *cs) { diff --git a/src/conn_stream.c b/src/conn_stream.c index 7a16afd4e..37f728405 100644 --- a/src/conn_stream.c +++ b/src/conn_stream.c @@ -443,7 +443,7 @@ int cs_reset_endp(struct stconn *cs) BUG_ON(!cs->app); sc_ep_clr(cs, SE_FL_ERROR); - if (!__cs_endp_target(cs)) { + if (!__sc_endp(cs)) { /* endpoint not attached or attached to a mux with no * target. Thus the endpoint will not be release but just * reset. The app is still attached, the cs will not be