]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: save proxy instance into qcc
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 22 Jul 2022 14:16:03 +0000 (16:16 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 1 Aug 2022 12:23:21 +0000 (14:23 +0200)
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
src/mux_quic.c

index a3aff843448e7a863341ad3317dc9c17a75db04a..748500d67a40d6ca87a449b617f200bb1313a169 100644 (file)
@@ -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;
index 3ab5333989dce96668d2f071628f8886e6715af0..f4d200daef1bdc68a03ddbc35854a9e9b3a27582 100644 (file)
@@ -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;