mirror of
https://github.com/nginx/nginx.git
synced 2025-07-31 10:36:14 +08:00
The ngx_quic_frame_len() function is not really needed.
This commit is contained in:
parent
18ce6d5ebf
commit
1b4b8af624
@ -997,7 +997,7 @@ ngx_quic_output(ngx_connection_t *c)
|
|||||||
do {
|
do {
|
||||||
/* process same-level group of frames */
|
/* process same-level group of frames */
|
||||||
|
|
||||||
len += ngx_quic_frame_len(f);// TODO: handle overflow, max size
|
len += ngx_quic_create_frame(NULL, NULL, f);// TODO: handle overflow, max size
|
||||||
|
|
||||||
f = f->next;
|
f = f->next;
|
||||||
} while (f && f->level == lvl);
|
} while (f && f->level == lvl);
|
||||||
|
@ -823,33 +823,6 @@ ngx_quic_create_frame(u_char *p, u_char *end, ngx_quic_frame_t *f)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t
|
|
||||||
ngx_quic_frame_len(ngx_quic_frame_t *frame)
|
|
||||||
{
|
|
||||||
switch (frame->type) {
|
|
||||||
case NGX_QUIC_FT_ACK:
|
|
||||||
return ngx_quic_create_ack(NULL, &frame->u.ack);
|
|
||||||
case NGX_QUIC_FT_CRYPTO:
|
|
||||||
return ngx_quic_create_crypto(NULL, &frame->u.crypto);
|
|
||||||
|
|
||||||
case NGX_QUIC_FT_STREAM0:
|
|
||||||
case NGX_QUIC_FT_STREAM1:
|
|
||||||
case NGX_QUIC_FT_STREAM2:
|
|
||||||
case NGX_QUIC_FT_STREAM3:
|
|
||||||
case NGX_QUIC_FT_STREAM4:
|
|
||||||
case NGX_QUIC_FT_STREAM5:
|
|
||||||
case NGX_QUIC_FT_STREAM6:
|
|
||||||
case NGX_QUIC_FT_STREAM7:
|
|
||||||
return ngx_quic_create_stream(NULL, &frame->u.stream);
|
|
||||||
case NGX_QUIC_FT_CONNECTION_CLOSE:
|
|
||||||
return ngx_quic_create_close(NULL, &frame->u.close);
|
|
||||||
default:
|
|
||||||
/* BUG: unsupported frame type generated */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
ngx_quic_create_ack(u_char *p, ngx_quic_ack_frame_t *ack)
|
ngx_quic_create_ack(u_char *p, ngx_quic_ack_frame_t *ack)
|
||||||
{
|
{
|
||||||
|
@ -200,6 +200,5 @@ ngx_int_t ngx_quic_parse_handshake_header(ngx_quic_header_t *pkt);
|
|||||||
ssize_t ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end,
|
ssize_t ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end,
|
||||||
ngx_quic_frame_t *frame);
|
ngx_quic_frame_t *frame);
|
||||||
ssize_t ngx_quic_create_frame(u_char *p, u_char *end, ngx_quic_frame_t *f);
|
ssize_t ngx_quic_create_frame(u_char *p, u_char *end, ngx_quic_frame_t *f);
|
||||||
size_t ngx_quic_frame_len(ngx_quic_frame_t *frame);
|
|
||||||
|
|
||||||
#endif /* _NGX_EVENT_QUIC_WIRE_H_INCLUDED_ */
|
#endif /* _NGX_EVENT_QUIC_WIRE_H_INCLUDED_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user