mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: mux-quic: Add .ctl callback function to get info about a mux connection
Other muxes implement this callback function. It was not implemented for the QUIC mux because it was useless. It will be used to retrieve the current/max number of stream for a quic connection. So let's added it, adding the default support for MUX_CTL_EXIT_STATUS command.
This commit is contained in:
parent
068ce2d5d2
commit
12fb6d73cd
@ -3136,6 +3136,19 @@ static void qmux_strm_shut(struct stconn *sc, enum se_shut_mode mode, struct se_
|
|||||||
TRACE_LEAVE(QMUX_EV_STRM_SHUT, qcc->conn, qcs);
|
TRACE_LEAVE(QMUX_EV_STRM_SHUT, qcc->conn, qcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int qmux_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *output)
|
||||||
|
{
|
||||||
|
struct qcc *qcc = conn->ctx;
|
||||||
|
|
||||||
|
switch (mux_ctl) {
|
||||||
|
case MUX_CTL_EXIT_STATUS:
|
||||||
|
return MUX_ES_UNKNOWN;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int qmux_sctl(struct stconn *sc, enum mux_sctl_type mux_sctl, void *output)
|
static int qmux_sctl(struct stconn *sc, enum mux_sctl_type mux_sctl, void *output)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -3192,6 +3205,7 @@ static const struct mux_ops qmux_ops = {
|
|||||||
.unsubscribe = qmux_strm_unsubscribe,
|
.unsubscribe = qmux_strm_unsubscribe,
|
||||||
.wake = qmux_wake,
|
.wake = qmux_wake,
|
||||||
.shut = qmux_strm_shut,
|
.shut = qmux_strm_shut,
|
||||||
|
.ctl = qmux_ctl,
|
||||||
.sctl = qmux_sctl,
|
.sctl = qmux_sctl,
|
||||||
.show_sd = qmux_strm_show_sd,
|
.show_sd = qmux_strm_show_sd,
|
||||||
.flags = MX_FL_HTX|MX_FL_NO_UPG|MX_FL_FRAMED,
|
.flags = MX_FL_HTX|MX_FL_NO_UPG|MX_FL_FRAMED,
|
||||||
|
Loading…
Reference in New Issue
Block a user