]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: connection: do not declare register_mux_proto() inline
authorWilly Tarreau <w@1wt.eu>
Wed, 2 Mar 2022 13:46:45 +0000 (14:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Mar 2022 13:46:45 +0000 (14:46 +0100)
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.

include/haproxy/connection.h
src/connection.c

index bfa658768e86646f12d5d1e6f4b5158dd8b50699..5ce13899a761fe8b6bd7b15644563edbceb238de 100644 (file)
@@ -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 <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 <list> */
 static inline void unregister_mux_proto(struct mux_proto_list *list)
 {
index c156d9313276801eb81a1e3b3c63aa14b758d55d..7d41471e5ff721d1aa9fd3aba0ef0e2c058194d8 100644 (file)
@@ -1565,6 +1565,12 @@ int conn_recv_socks4_proxy_response(struct connection *conn)
        return 0;
 }
 
+/* registers proto mux list <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 <out>. 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.