Skip to content

Commit

Permalink
Add const to some test tserver functions
Browse files Browse the repository at this point in the history
Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#20030)
  • Loading branch information
mattcaswell authored and hlandau committed Feb 22, 2023
1 parent c12e111 commit 45bb98b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/internal/quic_tserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ int ossl_quic_tserver_tick(QUIC_TSERVER *srv);
/*
* Returns 1 if we have finished the TLS handshake
*/
int ossl_quic_tserver_is_handshake_confirmed(QUIC_TSERVER *srv);
int ossl_quic_tserver_is_handshake_confirmed(const 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(const QUIC_TSERVER *srv);

QUIC_TERMINATE_CAUSE ossl_quic_tserver_get_terminate_cause(QUIC_TSERVER *srv);
QUIC_TERMINATE_CAUSE ossl_quic_tserver_get_terminate_cause(const QUIC_TSERVER *srv);

/* Returns 1 if the server is in a terminated state */
int ossl_quic_tserver_is_terminated(QUIC_TSERVER *srv);
int ossl_quic_tserver_is_terminated(const QUIC_TSERVER *srv);
/*
* Attempts to read from stream 0. Writes the number of bytes read to
* *bytes_read and returns 1 on success. If no bytes are available, 0 is written
Expand Down
8 changes: 4 additions & 4 deletions ssl/quic/quic_tserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,23 @@ int ossl_quic_tserver_tick(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(const QUIC_TSERVER *srv)
{
return ossl_quic_channel_is_term_any(srv->ch);
}

QUIC_TERMINATE_CAUSE ossl_quic_tserver_get_terminate_cause(QUIC_TSERVER *srv)
QUIC_TERMINATE_CAUSE ossl_quic_tserver_get_terminate_cause(const QUIC_TSERVER *srv)
{
return ossl_quic_channel_get_terminate_cause(srv->ch);
}

/* Returns 1 if the server is in a terminated state */
int ossl_quic_tserver_is_terminated(QUIC_TSERVER *srv)
int ossl_quic_tserver_is_terminated(const QUIC_TSERVER *srv)
{
return ossl_quic_channel_is_terminated(srv->ch);
}

int ossl_quic_tserver_is_handshake_confirmed(QUIC_TSERVER *srv)
int ossl_quic_tserver_is_handshake_confirmed(const QUIC_TSERVER *srv)
{
return ossl_quic_channel_is_handshake_confirmed(srv->ch);
}
Expand Down

0 comments on commit 45bb98b

Please sign in to comment.