From: Willy Tarreau Date: Wed, 2 Mar 2022 13:46:45 +0000 (+0100) Subject: BUILD: connection: do not declare register_mux_proto() inline X-Git-Tag: v2.6-dev3~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d318e4e0220ec090798baa1ce978f8a5ba071af4;p=thirdparty%2Fhaproxy.git BUILD: connection: do not declare register_mux_proto() inline This one is referenced in initcalls by its pointer, it makes no sense to declare it inline. At best it causes function duplication, at worst it doesn't build on older compilers. --- diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h index bfa658768e..5ce13899a7 100644 --- a/include/haproxy/connection.h +++ b/include/haproxy/connection.h @@ -101,6 +101,7 @@ uint64_t conn_hash_digest(char *buf, size_t bufsize, enum conn_hash_params_t flags); const char *conn_err_code_str(struct connection *c); int xprt_add_hs(struct connection *conn); +void register_mux_proto(struct mux_proto_list *list); extern struct idle_conns idle_conns[MAX_THREADS]; @@ -518,12 +519,6 @@ static inline int conn_get_alpn(const struct connection *conn, const char **str, return conn->xprt->get_alpn(conn, conn->xprt_ctx, str, len); } -/* registers proto mux list . Modifies the list element! */ -static inline void register_mux_proto(struct mux_proto_list *list) -{ - LIST_APPEND(&mux_proto_list.list, &list->list); -} - /* unregisters proto mux list */ static inline void unregister_mux_proto(struct mux_proto_list *list) { diff --git a/src/connection.c b/src/connection.c index c156d93132..7d41471e5f 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1565,6 +1565,12 @@ int conn_recv_socks4_proxy_response(struct connection *conn) return 0; } +/* registers proto mux list . Modifies the list element! */ +void register_mux_proto(struct mux_proto_list *list) +{ + LIST_APPEND(&mux_proto_list.list, &list->list); +} + /* Lists the known proto mux on . This function is used by "haproxy -vv" * and is suitable for early boot just after the "REGISTER" stage because it * doesn't depend on anything to be already allocated.