QUIC CONFORMANCE: Wire the DATA_SENT state

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21135)
This commit is contained in:
Hugo Landau 2023-06-06 16:25:12 +01:00 committed by Pauli
parent e0bd282517
commit c068f4d1e9

View File

@ -2372,8 +2372,16 @@ static int txp_generate_for_el_actual(OSSL_QUIC_TX_PACKETISER *txp,
*/
ossl_quic_stream_map_update_state(txp->args.qsm, stream);
if (stream->txp_drained)
if (stream->txp_drained) {
assert(!ossl_quic_sstream_has_pending(stream->sstream));
/*
* Transition to DATA_SENT if stream has a final size and we have
* sent all data.
*/
if (ossl_quic_sstream_get_final_size(stream->sstream, NULL))
ossl_quic_stream_map_notify_all_data_sent(txp->args.qsm, stream);
}
}
/* We have now sent the packet, so update state accordingly. */