]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stconn: rename __cs_endp_target() to __sc_endp()
authorWilly Tarreau <w@1wt.eu>
Wed, 18 May 2022 15:56:13 +0000 (17:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:34 +0000 (19:33 +0200)
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
src/conn_stream.c

index a7c9e3609d291013a6464ee45843f54f944ff4bd..ce0e673ba80cc7998beca96e9ca67cc3806da8c6 100644 (file)
@@ -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)
 {
index 7a16afd4eec3bf3862b4f936ed1894f9d7931752..37f72840535ec987335069afcbc297901d1877a6 100644 (file)
@@ -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