From: Christopher Faulet Date: Thu, 6 Jan 2022 07:13:46 +0000 (+0100) Subject: CLEANUP: stream-int: rename si_reset() to si_init() X-Git-Tag: v2.6-dev2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=014ac35eb25ebbbf4cf99c3fdb379611def6b45a;p=thirdparty%2Fhaproxy.git CLEANUP: stream-int: rename si_reset() to si_init() si_reset() function is only used when a stream-interface is allocated. Thus rename it to si_init() insteaad. --- diff --git a/include/haproxy/stream_interface.h b/include/haproxy/stream_interface.h index a30f345268..8119a42339 100644 --- a/include/haproxy/stream_interface.h +++ b/include/haproxy/stream_interface.h @@ -94,11 +94,10 @@ static inline struct stream_interface *si_opposite(struct stream_interface *si) return ((si->flags & SI_FL_ISBACK) ? cs_strm(si->cs)->csf->si : cs_strm(si->cs)->csb->si); } -/* initializes a stream interface in the SI_ST_INI state. It's detached from - * any endpoint and only keeps its side which is expected to have already been - * set. +/* initializes a stream interface in the SI_ST_INI state and create the event + * tasklet. */ -static inline int si_reset(struct stream_interface *si) +static inline int si_init(struct stream_interface *si) { si->src = NULL; si->dst = NULL; diff --git a/src/stream_interface.c b/src/stream_interface.c index aa3b6d876d..ecbd7b06d3 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -111,7 +111,7 @@ struct stream_interface *si_new(struct conn_stream *cs) if (unlikely(!si)) return NULL; si->flags = SI_FL_NONE; - if (si_reset(si) < 0) { + if (si_init(si) < 0) { pool_free(pool_head_streaminterface, si); return NULL; }