From 78adb4b4514f401e8592d1ae7d506ae93a3e10cf Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Tue, 31 Jan 2023 15:50:16 +0100 Subject: [PATCH] BUG/MINOR: h3: fix crash due to h3 traces This commit is identical to the preceeding patch. However, these traces are from another patch with a different backport scope : 56a86ddfb97d740f965503f6b5991fafa347308c MINOR: h3: add missing traces on closure This must be backported up to 2.7 where above patch is scheduled. --- src/h3.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/h3.c b/src/h3.c index d625807b0..ba3331120 100644 --- a/src/h3.c +++ b/src/h3.c @@ -1713,10 +1713,10 @@ static int h3_send_goaway(struct h3c *h3c) unsigned char data[3 * QUIC_VARINT_MAX_SIZE]; size_t frm_len = quic_int_getsize(h3c->id_goaway); - TRACE_ENTER(H3_EV_H3C_END, h3c->qcc); + TRACE_ENTER(H3_EV_H3C_END, h3c->qcc->conn); if (!qcs) { - TRACE_ERROR("control stream not initialized", H3_EV_H3C_END, h3c->qcc); + TRACE_ERROR("control stream not initialized", H3_EV_H3C_END, h3c->qcc->conn); goto err; } @@ -1729,18 +1729,18 @@ static int h3_send_goaway(struct h3c *h3c) res = mux_get_buf(qcs); if (!res || b_room(res) < b_data(&pos)) { /* Do not try forcefully to emit GOAWAY if no space left. */ - TRACE_ERROR("cannot send GOAWAY", H3_EV_H3C_END, h3c->qcc, qcs); + TRACE_ERROR("cannot send GOAWAY", H3_EV_H3C_END, h3c->qcc->conn, qcs); goto err; } b_force_xfer(res, &pos, b_data(&pos)); qcc_send_stream(qcs, 1); - TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc); + TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc->conn); return 0; err: - TRACE_DEVEL("leaving in error", H3_EV_H3C_END, h3c->qcc); + TRACE_DEVEL("leaving in error", H3_EV_H3C_END, h3c->qcc->conn); return 1; } @@ -1780,7 +1780,7 @@ static void h3_shutdown(void *ctx) { struct h3c *h3c = ctx; - TRACE_ENTER(H3_EV_H3C_END, h3c->qcc); + TRACE_ENTER(H3_EV_H3C_END, h3c->qcc->conn); /* RFC 9114 5.2. Connection Shutdown * @@ -1799,7 +1799,7 @@ static void h3_shutdown(void *ctx) */ qcc_emit_cc_app(h3c->qcc, H3_NO_ERROR, 0); - TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc); + TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc->conn); } static void h3_release(void *ctx)