]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h3: store control stream in h3c
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 13 Jul 2022 13:17:29 +0000 (15:17 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 15 Jul 2022 13:56:13 +0000 (15:56 +0200)
Store a reference to the HTTP/3 control stream in h3c context.

This will be useful to implement GOAWAY emission without having to store
the control stream ID on opening.

src/h3.c

index c1a9979388f333eca1cc579e4c35a843a880fa78..926632ee9bdbdfc51c87eec17ce08d73e4142c7c 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -113,6 +113,7 @@ static uint64_t h3_settings_max_field_section_size = QUIC_VARINT_8_BYTE_MAX; /*
 
 struct h3c {
        struct qcc *qcc;
+       struct qcs *ctrl_strm; /* Control stream */
        enum h3_err err;
        uint32_t flags;
 
@@ -1086,6 +1087,7 @@ static int h3_finalize(void *ctx)
                return 0;
 
        h3_control_send(qcs, h3c);
+       h3c->ctrl_strm = qcs;
 
        return 1;
 }
@@ -1103,6 +1105,7 @@ static int h3_init(struct qcc *qcc)
                goto fail_no_h3;
 
        h3c->qcc = qcc;
+       h3c->ctrl_strm = NULL;
        h3c->err = H3_NO_ERROR;
        h3c->flags = 0;