diff options
author | Matt Caswell <matt@openssl.org> | 2022-12-01 16:37:47 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-02-22 05:34:03 +0000 |
commit | 149a8e6c0a279b0dbbced72ffa6c5ed870a1bbc0 (patch) | |
tree | 668f6e0da5e938f52954f0dd3936706f9b57277d /ssl/quic/quic_tserver.c | |
parent | ce3106baba7601bfaf1d1412221e18dec4878e18 (diff) |
Enable QUIC test server to find out the termination reason
We enable querying of the termination reason which is useful for tests.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030)
Diffstat (limited to 'ssl/quic/quic_tserver.c')
-rw-r--r-- | ssl/quic/quic_tserver.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ssl/quic/quic_tserver.c b/ssl/quic/quic_tserver.c index ea131ca9c1..1bb17e8e53 100644 --- a/ssl/quic/quic_tserver.c +++ b/ssl/quic/quic_tserver.c @@ -148,9 +148,17 @@ int ossl_quic_tserver_is_connected(QUIC_TSERVER *srv) } /* Returns 1 if the server is in any terminating or terminated state */ -int ossl_quic_tserver_is_term_any(QUIC_TSERVER *srv) +int ossl_quic_tserver_is_term_any(QUIC_TSERVER *srv, + QUIC_TERMINATE_CAUSE *cause) { - return ossl_quic_channel_is_term_any(srv->ch); + return ossl_quic_channel_is_term_any(srv->ch, cause); +} + +/* Returns 1 if the server is in a terminated state */ +int ossl_quic_tserver_is_terminated(QUIC_TSERVER *srv, + QUIC_TERMINATE_CAUSE *cause) +{ + return ossl_quic_channel_is_terminated(srv->ch, cause); } int ossl_quic_tserver_read(QUIC_TSERVER *srv, |