Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_transport.c @ 8898:cab3b7a070ef quic
QUIC: removed dead code.
The function is no longer used since b3d9e57d0f62.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 10 Nov 2021 13:49:01 +0300 |
parents | de7b9af30fc6 |
children | d6ef13c5fd8e |
comparison
equal
deleted
inserted
replaced
8897:1d7bf9778328 | 8898:cab3b7a070ef |
---|---|
145 | 145 |
146 #define NGX_QUIC_NVERSIONS \ | 146 #define NGX_QUIC_NVERSIONS \ |
147 (sizeof(ngx_quic_versions) / sizeof(ngx_quic_versions[0])) | 147 (sizeof(ngx_quic_versions) / sizeof(ngx_quic_versions[0])) |
148 | 148 |
149 | 149 |
150 /* literal errors indexed by corresponding value */ | |
151 static char *ngx_quic_errors[] = { | |
152 "NO_ERROR", | |
153 "INTERNAL_ERROR", | |
154 "CONNECTION_REFUSED", | |
155 "FLOW_CONTROL_ERROR", | |
156 "STREAM_LIMIT_ERROR", | |
157 "STREAM_STATE_ERROR", | |
158 "FINAL_SIZE_ERROR", | |
159 "FRAME_ENCODING_ERROR", | |
160 "TRANSPORT_PARAMETER_ERROR", | |
161 "CONNECTION_ID_LIMIT_ERROR", | |
162 "PROTOCOL_VIOLATION", | |
163 "INVALID_TOKEN", | |
164 "APPLICATION_ERROR", | |
165 "CRYPTO_BUFFER_EXCEEDED", | |
166 "KEY_UPDATE_ERROR", | |
167 "AEAD_LIMIT_REACHED", | |
168 "NO_VIABLE_PATH", | |
169 }; | |
170 | |
171 | |
172 static ngx_inline u_char * | 150 static ngx_inline u_char * |
173 ngx_quic_parse_int(u_char *pos, u_char *end, uint64_t *out) | 151 ngx_quic_parse_int(u_char *pos, u_char *end, uint64_t *out) |
174 { | 152 { |
175 u_char *p; | 153 u_char *p; |
176 uint64_t value; | 154 uint64_t value; |
300 ngx_quic_build_int_set(p, value, 1, 0); | 278 ngx_quic_build_int_set(p, value, 1, 0); |
301 ngx_quic_build_int_set(p, value, 0, 0); | 279 ngx_quic_build_int_set(p, value, 0, 0); |
302 } | 280 } |
303 | 281 |
304 *pos = p; | 282 *pos = p; |
305 } | |
306 | |
307 | |
308 u_char * | |
309 ngx_quic_error_text(uint64_t error_code) | |
310 { | |
311 if (error_code >= NGX_QUIC_ERR_CRYPTO_ERROR) { | |
312 return (u_char *) "handshake error"; | |
313 } | |
314 | |
315 if (error_code >= NGX_QUIC_ERR_LAST) { | |
316 return (u_char *) "unknown error"; | |
317 } | |
318 | |
319 return (u_char *) ngx_quic_errors[error_code]; | |
320 } | 283 } |
321 | 284 |
322 | 285 |
323 ngx_int_t | 286 ngx_int_t |
324 ngx_quic_parse_packet(ngx_quic_header_t *pkt) | 287 ngx_quic_parse_packet(ngx_quic_header_t *pkt) |