From 07bf8f4d8631c29297ded195d9d4004fba2c030d Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 22 Jul 2022 16:16:03 +0200 Subject: [PATCH] MINOR: mux-quic: save proxy instance into qcc Store a reference to proxy in the qcc structure. This will be useful to access to proxy members outside of qcc_init(). Most notably, this change is required to implement timeout refreshing by using the various timeouts configured at the proxy level. --- include/haproxy/mux_quic-t.h | 2 ++ src/mux_quic.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index a3aff84344..748500d67a 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -91,6 +91,8 @@ struct qcc { struct wait_event wait_event; /* To be used if we're waiting for I/Os */ struct wait_event *subs; + struct proxy *proxy; + /* haproxy timeout management */ struct task *task; int timeout; diff --git a/src/mux_quic.c b/src/mux_quic.c index 3ab5333989..f4d200daef 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -1815,6 +1815,7 @@ static int qc_init(struct connection *conn, struct proxy *prx, qcc->wait_event.tasklet->context = qcc; qcc->wait_event.events = 0; + qcc->proxy = prx; /* haproxy timeouts */ qcc->task = NULL; qcc->timeout = prx->timeout.client;