aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-03-19 14:59:55 +0300
committerVladimir Homutov <vl@nginx.com>2020-03-19 14:59:55 +0300
commit1b4b8af624c066c4adc49048686cface6671ddb6 (patch)
tree3d16ed038a2dd2a63b42a48585f89a1bc080505c /src
parent18ce6d5ebfcf619c103994dd38278014ec01506c (diff)
downloadnginx-1b4b8af624c066c4adc49048686cface6671ddb6.tar.gz
nginx-1b4b8af624c066c4adc49048686cface6671ddb6.zip
The ngx_quic_frame_len() function is not really needed.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic.c2
-rw-r--r--src/event/ngx_event_quic_transport.c27
-rw-r--r--src/event/ngx_event_quic_transport.h1
3 files changed, 1 insertions, 29 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index 8ef6ab213..6f83bfd51 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -997,7 +997,7 @@ ngx_quic_output(ngx_connection_t *c)
do {
/* 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;
} while (f && f->level == lvl);
diff --git a/src/event/ngx_event_quic_transport.c b/src/event/ngx_event_quic_transport.c
index c3b4b8bc6..ffcc7d5c1 100644
--- a/src/event/ngx_event_quic_transport.c
+++ b/src/event/ngx_event_quic_transport.c
@@ -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
ngx_quic_create_ack(u_char *p, ngx_quic_ack_frame_t *ack)
{
diff --git a/src/event/ngx_event_quic_transport.h b/src/event/ngx_event_quic_transport.h
index 51f03f39f..311ff9441 100644
--- a/src/event/ngx_event_quic_transport.h
+++ b/src/event/ngx_event_quic_transport.h
@@ -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,
ngx_quic_frame_t *frame);
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_ */