From 1564ec0a9302a6568ddb40a21637079a3eaf3857 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 23 Nov 2023 15:57:53 +0100 Subject: [PATCH] REORG: quic: Move some QUIC CLI code to its C file Move init_quic() from quic_conn.c to quic_cli.c and rename it to cli_quic_init(). --- src/quic_cli.c | 10 ++++++++++ src/quic_conn.c | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/quic_cli.c b/src/quic_cli.c index 91caba2..07a32f6 100644 --- a/src/quic_cli.c +++ b/src/quic_cli.c @@ -401,3 +401,13 @@ static struct cli_kw_list cli_kws = {{ }, { INITCALL1(STG_REGISTER, cli_register_kw, &cli_kws); +static void cli_quic_init() +{ + int thr; + + for (thr = 0; thr < MAX_THREADS; ++thr) { + LIST_INIT(&ha_thread_ctx[thr].quic_conns); + LIST_INIT(&ha_thread_ctx[thr].quic_conns_clo); + } +} +INITCALL0(STG_INIT, cli_quic_init); diff --git a/src/quic_conn.c b/src/quic_conn.c index d729297..0f5377a 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -2048,17 +2048,6 @@ void qc_finalize_affinity_rebind(struct quic_conn *qc) TRACE_LEAVE(QUIC_EV_CONN_SET_AFFINITY, qc); } -static void init_quic() -{ - int thr; - - for (thr = 0; thr < MAX_THREADS; ++thr) { - LIST_INIT(&ha_thread_ctx[thr].quic_conns); - LIST_INIT(&ha_thread_ctx[thr].quic_conns_clo); - } -} -INITCALL0(STG_INIT, init_quic); - /* * Local variables: * c-indent-level: 8 -- 1.7.10.4