diff options
author | Hugo Landau <hlandau@openssl.org> | 2024-03-29 14:51:35 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-04-10 15:49:00 +0200 |
commit | 8cd3f34758b292e137ce112a09f566821549115d (patch) | |
tree | 80cd671e1d0af87b0ae6ac84c2dc2de64d3f9a47 /include | |
parent | da01235692de643c990a34cae0f523a126be7573 (diff) |
Change approach to SSL_pending API
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24040)
(cherry picked from commit 5a13d35f243be66f6ad914aefe99fb708812dff1)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/quic_stream_map.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/internal/quic_stream_map.h b/include/internal/quic_stream_map.h index 55a395de16..745d9c03d4 100644 --- a/include/internal/quic_stream_map.h +++ b/include/internal/quic_stream_map.h @@ -504,10 +504,11 @@ static ossl_inline ossl_unused int ossl_quic_stream_recv_get_final_size(const QU } /* - * Determines the number of bytes available still to be read, and whether a FIN - * has yet to be read. + * Determines the number of bytes available still to be read, and (if + * include_fin is 1) whether a FIN or reset has yet to be read. */ -static ossl_inline ossl_unused int ossl_quic_stream_recv_pending(const QUIC_STREAM *s) +static ossl_inline ossl_unused int ossl_quic_stream_recv_pending(const QUIC_STREAM *s, + int include_fin) { size_t avail; int fin = 0; @@ -523,13 +524,13 @@ static ossl_inline ossl_unused int ossl_quic_stream_recv_pending(const QUIC_STRE if (!ossl_quic_rstream_available(s->rstream, &avail, &fin)) avail = 0; - if (avail == 0 && fin) + if (avail == 0 && include_fin && fin) avail = 1; return avail; case QUIC_RSTREAM_STATE_RESET_RECVD: - return 1; + return include_fin; case QUIC_RSTREAM_STATE_DATA_READ: case QUIC_RSTREAM_STATE_RESET_READ: |