diff --git a/include/haproxy/h3.h b/include/haproxy/h3.h index 504e9bfed..ab088d86a 100644 --- a/include/haproxy/h3.h +++ b/include/haproxy/h3.h @@ -111,7 +111,5 @@ enum h3s_st_req { extern const struct qcc_app_ops h3_ops; -size_t h3_snd_buf(struct stconn *sc, struct buffer *buf, size_t count, int flags); - #endif /* USE_QUIC */ #endif /* _HAPROXY_H3_T_H */ diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index 1670262a1..43ea53044 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -185,7 +185,7 @@ struct qcc_app_ops { int (*init)(struct qcc *qcc); int (*attach)(struct qcs *qcs, void *conn_ctx); ssize_t (*decode_qcs)(struct qcs *qcs, struct buffer *b, int fin); - size_t (*snd_buf)(struct stconn *sc, struct buffer *buf, size_t count, int flags); + size_t (*snd_buf)(struct qcs *qcs, struct buffer *buf, size_t count, int flags); void (*detach)(struct qcs *qcs); int (*finalize)(void *ctx); void (*shutdown)(void *ctx); /* Close a connection. */ diff --git a/src/h3.c b/src/h3.c index 8d13f5d09..187c6065b 100644 --- a/src/h3.c +++ b/src/h3.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -1013,10 +1012,9 @@ static int h3_resp_data_send(struct qcs *qcs, struct buffer *buf, size_t count) return total; } -size_t h3_snd_buf(struct stconn *sc, struct buffer *buf, size_t count, int flags) +static size_t h3_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count, int flags) { size_t total = 0; - struct qcs *qcs = __sc_mux_strm(sc); struct htx *htx; enum htx_blk_type btype; struct htx_blk *blk; diff --git a/src/hq_interop.c b/src/hq_interop.c index be0287f6f..a133cd53b 100644 --- a/src/hq_interop.c +++ b/src/hq_interop.c @@ -12,7 +12,6 @@ static ssize_t hq_interop_decode_qcs(struct qcs *qcs, struct buffer *b, int fin) { struct htx *htx; struct htx_sl *sl; - struct stconn *sc; struct buffer htx_buf = BUF_NULL; struct ist path; char *ptr = b_head(b); @@ -70,8 +69,7 @@ static ssize_t hq_interop_decode_qcs(struct qcs *qcs, struct buffer *b, int fin) htx_add_endof(htx, HTX_BLK_EOH); htx_to_buf(htx, &htx_buf); - sc = qc_attach_sc(qcs, &htx_buf); - if (!sc) + if (!qc_attach_sc(qcs, &htx_buf)) return -1; b_free(&htx_buf); @@ -90,10 +88,9 @@ static struct buffer *mux_get_buf(struct qcs *qcs) return &qcs->tx.buf; } -static size_t hq_interop_snd_buf(struct stconn *sc, struct buffer *buf, +static size_t hq_interop_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count, int flags) { - struct qcs *qcs = __sc_mux_strm(sc); struct htx *htx; enum htx_blk_type btype; struct htx_blk *blk; diff --git a/src/mux_quic.c b/src/mux_quic.c index 08db5387e..5b4a35469 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2225,7 +2225,7 @@ static size_t qc_snd_buf(struct stconn *sc, struct buffer *buf, goto end; } - ret = qcs->qcc->app_ops->snd_buf(sc, buf, count, flags); + ret = qcs->qcc->app_ops->snd_buf(qcs, buf, count, flags); end: TRACE_LEAVE(QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs);