From: Christopher Faulet Date: Thu, 21 Apr 2022 06:44:09 +0000 (+0200) Subject: CLEANUP: conn-stream: Rename cs_applet_release() X-Git-Tag: v2.6-dev7~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca6c9bba823a72239428a3aadaa713dfd438dfc8;p=thirdparty%2Fhaproxy.git CLEANUP: conn-stream: Rename cs_applet_release() 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(). --- diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index 604ccd4344..8511b96df3 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -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) diff --git a/src/conn_stream.c b/src/conn_stream.c index e37e8ea824..c721083ac3 100644 --- a/src/conn_stream.c +++ b/src/conn_stream.c @@ -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: