]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: conn-stream: Rename cs_applet_release()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 21 Apr 2022 06:44:09 +0000 (08:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Apr 2022 12:14:27 +0000 (14:14 +0200)
This function does not release the applet but only call the applet release
callback. It is equivalent to cs_conn_shut() but for applets. Thus the
function is renamed cs_applet_shut().

include/haproxy/conn_stream.h
src/conn_stream.c

index 604ccd4344a745ba46d32db9f480869a66641a93..8511b96df391084514b060d38dd8e9c6db89f611 100644 (file)
@@ -52,7 +52,7 @@ void cs_detach_endp(struct conn_stream *cs);
 void cs_detach_app(struct conn_stream *cs);
 
 struct appctx *cs_applet_create(struct conn_stream *cs, struct applet *app);
-void cs_applet_release(struct conn_stream *cs);
+void cs_applet_shut(struct conn_stream *cs);
 
 /* Returns the endpoint target without any control */
 static inline void *__cs_endp_target(const struct conn_stream *cs)
index e37e8ea824b62227887aa7d4c203b3297bd6402c..c721083ac3bc31ce42dbed5d460262bd347348a7 100644 (file)
@@ -375,7 +375,7 @@ void cs_detach_endp(struct conn_stream *cs)
                struct appctx *appctx = __cs_appctx(cs);
 
                cs->endp->flags |= CS_EP_ORPHAN;
-               cs_applet_release(cs);
+               cs_applet_shut(cs);
                appctx_free(appctx);
                cs->endp = NULL;
        }
@@ -472,7 +472,7 @@ struct appctx *cs_applet_create(struct conn_stream *cs, struct applet *app)
 }
 
 /* call the applet's release function if any. Needs to be called upon close() */
-void cs_applet_release(struct conn_stream *cs)
+void cs_applet_shut(struct conn_stream *cs)
 {
        struct appctx *appctx = __cs_appctx(cs);
 
@@ -874,7 +874,7 @@ static void cs_app_shutr_applet(struct conn_stream *cs)
                return;
 
        if (cs_oc(cs)->flags & CF_SHUTW) {
-               cs_applet_release(cs);
+               cs_applet_shut(cs);
                cs->state = CS_ST_DIS;
                __cs_strm(cs)->conn_exp = TICK_ETERNITY;
        }
@@ -932,7 +932,7 @@ static void cs_app_shutw_applet(struct conn_stream *cs)
        case CS_ST_QUE:
        case CS_ST_TAR:
                /* Note that none of these states may happen with applets */
-               cs_applet_release(cs);
+               cs_applet_shut(cs);
                cs->state = CS_ST_DIS;
                /* fall through */
        default: