diff --git a/include/haproxy/quic_frame-t.h b/include/haproxy/quic_frame-t.h index 5f1554c8d..f8ed4b15c 100644 --- a/include/haproxy/quic_frame-t.h +++ b/include/haproxy/quic_frame-t.h @@ -32,7 +32,6 @@ #include #include #include -#include #include extern struct pool_head *pool_head_quic_frame; @@ -170,7 +169,7 @@ struct qf_new_token { struct qf_stream { uint64_t id; - struct qc_stream_desc *stream; + void *stream; /* used only on TX when constructing frames. * Data cleared when processing ACK related to this STREAM frame. diff --git a/include/haproxy/quic_stream.h b/include/haproxy/quic_stream.h index b4d56a2c7..b5dc596a4 100644 --- a/include/haproxy/quic_stream.h +++ b/include/haproxy/quic_stream.h @@ -41,16 +41,16 @@ static inline void qc_stream_desc_send(struct qc_stream_desc *stream, /* Subscribe for send notification on . */ static inline void qc_stream_desc_sub_send(struct qc_stream_desc *stream, - void (*cb)(struct qc_stream_desc *s, uint64_t offset, uint64_t len)) + void (*cb)(void *ctx, uint64_t offset, uint64_t len)) { - stream->notify_send = cb; + stream->notify_send = (void (*)(struct qc_stream_desc *, uint64_t offset, uint64_t len))cb; } /* Subscribe for room notification on . */ static inline void qc_stream_desc_sub_room(struct qc_stream_desc *stream, - void (*cb)(struct qc_stream_desc *s, uint64_t offset)) + void (*cb)(void *ctx, uint64_t offset)) { - stream->notify_room = cb; + stream->notify_room = (void (*)(struct qc_stream_desc *, uint64_t offset))cb; } #endif /* USE_QUIC */ diff --git a/src/mux_quic.c b/src/mux_quic.c index c05c4fc7b..4995ffb37 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -37,8 +37,8 @@ DECLARE_TYPED_POOL(pool_head_qcc, "qcc", struct qcc); DECLARE_TYPED_POOL(pool_head_qcs, "qcs", struct qcs); DECLARE_STATIC_TYPED_POOL(pool_head_qc_stream_rxbuf, "qc_stream_rxbuf", struct qc_stream_rxbuf); -static void qmux_ctrl_send(struct qc_stream_desc *, uint64_t data, uint64_t offset); -static void qmux_ctrl_room(struct qc_stream_desc *, uint64_t room); +static void qmux_ctrl_send(void *ctx, uint64_t data, uint64_t offset); +static void qmux_ctrl_room(void *ctx, uint64_t room); int qmux_is_quic(const struct qcc *qcc) { @@ -614,9 +614,9 @@ static uint64_t qcs_prep_bytes(const struct qcs *qcs) /* Used as a callback for qc_stream_desc layer to notify about emission of a * STREAM frame of length starting at . */ -static void qmux_ctrl_send(struct qc_stream_desc *stream, uint64_t data, uint64_t offset) +static void qmux_ctrl_send(void *ctx, uint64_t data, uint64_t offset) { - struct qcs *qcs = stream->ctx; + struct qcs *qcs = ((struct qc_stream_desc *)ctx)->ctx; struct qcc *qcc = qcs->qcc; uint64_t diff; @@ -715,8 +715,9 @@ static inline int qcc_bufwnd_full(const struct qcc *qcc) } } -static void qmux_ctrl_room(struct qc_stream_desc *stream, uint64_t room) +static void qmux_ctrl_room(void *ctx, uint64_t room) { + struct qc_stream_desc *stream = ctx; /* Context is different for active and released streams. */ struct qcc *qcc = !(stream->flags & QC_SD_FL_RELEASE) ? ((struct qcs *)stream->ctx)->qcc : stream->ctx;