]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h3: remove quic_conn only reference
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 18 Dec 2023 18:01:53 +0000 (19:01 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 20 Dec 2023 09:38:30 +0000 (10:38 +0100)
H3 uses a direct reference to quic_conn to access the listener instance.
This can be replaced by using qcc->conn->target. This allows to remove
quic_conn-t.h header include from it.

src/h3.c

index 0616b764ca552269b0d42efbc6f4cc4a14241230..24db5e96cdd4b2be08df699a791bd7c4bd984aab 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -36,7 +36,6 @@
 #include <haproxy/qmux_http.h>
 #include <haproxy/qpack-dec.h>
 #include <haproxy/qpack-enc.h>
-#include <haproxy/quic_conn-t.h>
 #include <haproxy/quic_enc.h>
 #include <haproxy/quic_frame.h>
 #include <haproxy/stats-t.h>
@@ -2177,7 +2176,7 @@ static int h3_send_goaway(struct h3c *h3c)
 static int h3_init(struct qcc *qcc)
 {
        struct h3c *h3c;
-       struct quic_conn *qc = qcc->conn->handle.qc;
+       const struct listener *li = __objt_listener(qcc->conn->target);
 
        h3c = pool_alloc(pool_head_h3c);
        if (!h3c)
@@ -2190,9 +2189,8 @@ static int h3_init(struct qcc *qcc)
        h3c->id_goaway = 0;
 
        qcc->ctx = h3c;
-       /* TODO cleanup only ref to quic_conn */
        h3c->prx_counters =
-               EXTRA_COUNTERS_GET(qc->li->bind_conf->frontend->extra_counters_fe,
+               EXTRA_COUNTERS_GET(li->bind_conf->frontend->extra_counters_fe,
                                   &h3_stats_module);
        LIST_INIT(&h3c->buf_wait.list);