diff options
author | Hugo Landau <hlandau@openssl.org> | 2022-10-31 14:39:13 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-01-13 13:20:10 +0000 |
commit | 6d5d5fc9a9f6b701fc5e17f05d3df464fe0bc56e (patch) | |
tree | f8472a74275baaa0618ba6a11707c906be25cbe3 /ssl/quic/quic_rstream.c | |
parent | f71ae05a4d22d52780fc7cfc7e60710b74fd3dd7 (diff) |
QUIC RX: Support refcounted packets and eliminate wrapper
Previously, the QRX filled in a OSSL_QRX_PKT structure provided by the
caller. This necessitated the caller managing reference counting itself
using a OSSL_QRX_PKT_WRAP structure. The need for this structure has
been eliminated by adding refcounting support to the QRX itself. The QRX
now outputs a pointer to an OSSL_QRX_PKT instead of filling in a
structure provided by the caller. The OSSL_QRX_PKT_WRAP structure has
been eliminated.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
Diffstat (limited to 'ssl/quic/quic_rstream.c')
-rw-r--r-- | ssl/quic/quic_rstream.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ssl/quic/quic_rstream.c b/ssl/quic/quic_rstream.c index 9c4b8b716b..f8ad8b89de 100644 --- a/ssl/quic/quic_rstream.c +++ b/ssl/quic/quic_rstream.c @@ -17,7 +17,7 @@ struct quic_rstream_st { OSSL_STATM *statm; }; -QUIC_RSTREAM *ossl_quic_rstream_new(OSSL_QRX *qrx, QUIC_RXFC *rxfc, +QUIC_RSTREAM *ossl_quic_rstream_new(QUIC_RXFC *rxfc, OSSL_STATM *statm) { QUIC_RSTREAM *ret = OPENSSL_malloc(sizeof(*ret)); @@ -25,7 +25,7 @@ QUIC_RSTREAM *ossl_quic_rstream_new(OSSL_QRX *qrx, QUIC_RXFC *rxfc, if (ret == NULL) return NULL; - ossl_sframe_list_init(&ret->fl, qrx); + ossl_sframe_list_init(&ret->fl); ret->rxfc = rxfc; ret->statm = statm; return ret; @@ -37,7 +37,7 @@ void ossl_quic_rstream_free(QUIC_RSTREAM *qrs) OPENSSL_free(qrs); } -int ossl_quic_rstream_queue_data(QUIC_RSTREAM *qrs, OSSL_QRX_PKT_WRAP *pkt_wrap, +int ossl_quic_rstream_queue_data(QUIC_RSTREAM *qrs, OSSL_QRX_PKT *pkt, uint64_t offset, const unsigned char *data, uint64_t data_len, int fin) @@ -47,7 +47,7 @@ int ossl_quic_rstream_queue_data(QUIC_RSTREAM *qrs, OSSL_QRX_PKT_WRAP *pkt_wrap, range.start = offset; range.end = offset + data_len; - return ossl_sframe_list_insert(&qrs->fl, &range, pkt_wrap, data, fin); + return ossl_sframe_list_insert(&qrs->fl, &range, pkt, data, fin); } static int read_internal(QUIC_RSTREAM *qrs, unsigned char *buf, size_t size, |