diff options
author | Vladimir Homutov <vl@nginx.com> | 2021-11-10 13:49:01 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2021-11-10 13:49:01 +0300 |
commit | 6f9f8bf96e8ebe04572333e15388e7bc0db79ede (patch) | |
tree | e2991f9ff0b88798af5f1ae190976ac8ca2d4d9c /src | |
parent | df22336bfa387c1724a3b8b9ce97d002ab081721 (diff) | |
download | nginx-6f9f8bf96e8ebe04572333e15388e7bc0db79ede.tar.gz nginx-6f9f8bf96e8ebe04572333e15388e7bc0db79ede.zip |
QUIC: removed dead code.
The function is no longer used since b3d9e57d0f62.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/quic/ngx_event_quic_transport.c | 37 | ||||
-rw-r--r-- | src/event/quic/ngx_event_quic_transport.h | 2 |
2 files changed, 0 insertions, 39 deletions
diff --git a/src/event/quic/ngx_event_quic_transport.c b/src/event/quic/ngx_event_quic_transport.c index 6bc188b59..c39d1094c 100644 --- a/src/event/quic/ngx_event_quic_transport.c +++ b/src/event/quic/ngx_event_quic_transport.c @@ -147,28 +147,6 @@ uint32_t ngx_quic_versions[] = { (sizeof(ngx_quic_versions) / sizeof(ngx_quic_versions[0])) -/* literal errors indexed by corresponding value */ -static char *ngx_quic_errors[] = { - "NO_ERROR", - "INTERNAL_ERROR", - "CONNECTION_REFUSED", - "FLOW_CONTROL_ERROR", - "STREAM_LIMIT_ERROR", - "STREAM_STATE_ERROR", - "FINAL_SIZE_ERROR", - "FRAME_ENCODING_ERROR", - "TRANSPORT_PARAMETER_ERROR", - "CONNECTION_ID_LIMIT_ERROR", - "PROTOCOL_VIOLATION", - "INVALID_TOKEN", - "APPLICATION_ERROR", - "CRYPTO_BUFFER_EXCEEDED", - "KEY_UPDATE_ERROR", - "AEAD_LIMIT_REACHED", - "NO_VIABLE_PATH", -}; - - static ngx_inline u_char * ngx_quic_parse_int(u_char *pos, u_char *end, uint64_t *out) { @@ -305,21 +283,6 @@ ngx_quic_build_int(u_char **pos, uint64_t value) } -u_char * -ngx_quic_error_text(uint64_t error_code) -{ - if (error_code >= NGX_QUIC_ERR_CRYPTO_ERROR) { - return (u_char *) "handshake error"; - } - - if (error_code >= NGX_QUIC_ERR_LAST) { - return (u_char *) "unknown error"; - } - - return (u_char *) ngx_quic_errors[error_code]; -} - - ngx_int_t ngx_quic_parse_packet(ngx_quic_header_t *pkt) { diff --git a/src/event/quic/ngx_event_quic_transport.h b/src/event/quic/ngx_event_quic_transport.h index ed5777b16..c84f4576b 100644 --- a/src/event/quic/ngx_event_quic_transport.h +++ b/src/event/quic/ngx_event_quic_transport.h @@ -90,7 +90,6 @@ #define NGX_QUIC_FT_LAST NGX_QUIC_FT_HANDSHAKE_DONE /* 22.5. QUIC Transport Error Codes Registry */ -/* Keep in sync with ngx_quic_errors[] */ #define NGX_QUIC_ERR_NO_ERROR 0x00 #define NGX_QUIC_ERR_INTERNAL_ERROR 0x01 #define NGX_QUIC_ERR_CONNECTION_REFUSED 0x02 @@ -109,7 +108,6 @@ #define NGX_QUIC_ERR_AEAD_LIMIT_REACHED 0x0F #define NGX_QUIC_ERR_NO_VIABLE_PATH 0x10 -#define NGX_QUIC_ERR_LAST 0x11 #define NGX_QUIC_ERR_CRYPTO_ERROR 0x100 #define NGX_QUIC_ERR_CRYPTO(e) (NGX_QUIC_ERR_CRYPTO_ERROR + (e)) |