summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_frames.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2021-12-16 17:07:11 +0300
committerRoman Arutyunyan <arut@nginx.com>2021-12-16 17:07:11 +0300
commit703be8c8f6db385b76c0c8b394cc3b2220639616 (patch)
tree642292c9b3697264dad56f1513535dd9ec892d55 /src/event/quic/ngx_event_quic_frames.c
parent4d79f94221db9959a4bb3fee6fb3fc21d52266e8 (diff)
downloadnginx-703be8c8f6db385b76c0c8b394cc3b2220639616.tar.gz
nginx-703be8c8f6db385b76c0c8b394cc3b2220639616.tar.bz2
QUIC: removed ngx_quic_copy_chain().
The function is unused.
Diffstat (limited to 'src/event/quic/ngx_event_quic_frames.c')
-rw-r--r--src/event/quic/ngx_event_quic_frames.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/event/quic/ngx_event_quic_frames.c b/src/event/quic/ngx_event_quic_frames.c
index d4b0cf1c0..98400ea87 100644
--- a/src/event/quic/ngx_event_quic_frames.c
+++ b/src/event/quic/ngx_event_quic_frames.c
@@ -431,65 +431,6 @@ ngx_quic_copy_buf(ngx_connection_t *c, u_char *data, size_t len)
ngx_chain_t *
-ngx_quic_copy_chain(ngx_connection_t *c, ngx_chain_t *in, size_t limit)
-{
- size_t n;
- ngx_buf_t *b;
- ngx_chain_t *cl, *out, **ll;
-
- out = NULL;
- ll = &out;
-
- while (in) {
- if (!ngx_buf_in_memory(in->buf) || ngx_buf_size(in->buf) == 0) {
- in = in->next;
- continue;
- }
-
- cl = ngx_quic_alloc_chain(c);
- if (cl == NULL) {
- return NGX_CHAIN_ERROR;
- }
-
- *ll = cl;
- ll = &cl->next;
-
- b = cl->buf;
-
- while (in && b->last != b->end) {
-
- n = ngx_min(in->buf->last - in->buf->pos, b->end - b->last);
-
- if (limit > 0 && n > limit) {
- n = limit;
- }
-
- b->last = ngx_cpymem(b->last, in->buf->pos, n);
-
- in->buf->pos += n;
- if (in->buf->pos == in->buf->last) {
- in = in->next;
- }
-
- if (limit > 0) {
- if (limit == n) {
- goto done;
- }
-
- limit -= n;
- }
- }
- }
-
-done:
-
- *ll = NULL;
-
- return out;
-}
-
-
-ngx_chain_t *
ngx_quic_write_chain(ngx_connection_t *c, ngx_chain_t **chain, ngx_chain_t *in,
off_t limit, off_t offset)
{