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.
This commit is contained in:
Amaury Denoyelle 2022-07-22 16:16:03 +02:00
parent 09ec3e09bd
commit 07bf8f4d86
2 changed files with 3 additions and 0 deletions

View 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 wait_event; /* To be used if we're waiting for I/Os */
struct wait_event *subs; struct wait_event *subs;
struct proxy *proxy;
/* haproxy timeout management */ /* haproxy timeout management */
struct task *task; struct task *task;
int timeout; int timeout;

View File

@ -1815,6 +1815,7 @@ static int qc_init(struct connection *conn, struct proxy *prx,
qcc->wait_event.tasklet->context = qcc; qcc->wait_event.tasklet->context = qcc;
qcc->wait_event.events = 0; qcc->wait_event.events = 0;
qcc->proxy = prx;
/* haproxy timeouts */ /* haproxy timeouts */
qcc->task = NULL; qcc->task = NULL;
qcc->timeout = prx->timeout.client; qcc->timeout = prx->timeout.client;