ctx = ngx_quic_get_send_ctx(qc, level);
- ngx_quic_free_bufs(c, ctx->crypto);
+ ngx_quic_free_chain(c, ctx->crypto);
while (!ngx_queue_empty(&ctx->sent)) {
q = ngx_queue_head(&ctx->sent);
qc = ngx_quic_get_connection(c);
if (frame->data) {
- ngx_quic_free_bufs(c, frame->data);
+ ngx_quic_free_chain(c, frame->data);
}
ngx_queue_insert_head(&qc->free_frames, &frame->queue);
void
-ngx_quic_trim_bufs(ngx_chain_t *in, size_t size)
+ngx_quic_trim_chain(ngx_chain_t *in, size_t size)
{
size_t n;
ngx_buf_t *b;
void
-ngx_quic_free_bufs(ngx_connection_t *c, ngx_chain_t *in)
+ngx_quic_free_chain(ngx_connection_t *c, ngx_chain_t *in)
{
ngx_buf_t *b, *shadow;
ngx_chain_t *cl;
ngx_chain_t *
-ngx_quic_alloc_buf(ngx_connection_t *c)
+ngx_quic_alloc_chain(ngx_connection_t *c)
{
ngx_buf_t *b;
ngx_chain_t *cl;
return NULL;
}
- b->tag = (ngx_buf_tag_t) &ngx_quic_alloc_buf;
+ b->tag = (ngx_buf_tag_t) &ngx_quic_alloc_chain;
cl->buf = b;
ll = &out;
while (len) {
- cl = ngx_quic_alloc_buf(c);
+ cl = ngx_quic_alloc_chain(c);
if (cl == NULL) {
return NGX_CHAIN_ERROR;
}
continue;
}
- cl = ngx_quic_alloc_buf(c);
+ cl = ngx_quic_alloc_chain(c);
if (cl == NULL) {
return NGX_CHAIN_ERROR;
}
cl = *chain;
if (cl == NULL) {
- cl = ngx_quic_alloc_buf(c);
+ cl = ngx_quic_alloc_chain(c);
if (cl == NULL) {
return NGX_CHAIN_ERROR;
}
ngx_int_t ngx_quic_split_frame(ngx_connection_t *c, ngx_quic_frame_t *f,
size_t len);
-ngx_chain_t *ngx_quic_alloc_buf(ngx_connection_t *c);
+ngx_chain_t *ngx_quic_alloc_chain(ngx_connection_t *c);
ngx_chain_t *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);
-void ngx_quic_trim_bufs(ngx_chain_t *in, size_t size);
-void ngx_quic_free_bufs(ngx_connection_t *c, ngx_chain_t *in);
+void ngx_quic_trim_chain(ngx_chain_t *in, size_t size);
+void ngx_quic_free_chain(ngx_connection_t *c, ngx_chain_t *in);
ngx_chain_t *ngx_quic_read_chain(ngx_connection_t *c, ngx_chain_t **chain,
off_t limit);
ngx_chain_t *ngx_quic_write_chain(ngx_connection_t *c, ngx_chain_t **chain,
left = b ? b->end - b->last : 0;
if (left < len) {
- cl = ngx_quic_alloc_buf(c);
+ cl = ngx_quic_alloc_chain(c);
if (cl == NULL) {
return NGX_ERROR;
}
return NGX_OK;
}
- ngx_quic_trim_bufs(frame->data, ctx->crypto_received - f->offset);
+ ngx_quic_trim_chain(frame->data, ctx->crypto_received - f->offset);
if (ngx_quic_crypto_input(c, frame->data) != NGX_OK) {
return NGX_ERROR;
}
- ngx_quic_trim_bufs(ctx->crypto, last - ctx->crypto_received);
+ ngx_quic_trim_chain(ctx->crypto, last - ctx->crypto_received);
ctx->crypto_received = last;
cl = ctx->crypto;
return NGX_ERROR;
}
- ngx_quic_free_bufs(c, cl);
+ ngx_quic_free_chain(c, cl);
}
return NGX_OK;
buf = ngx_cpymem(buf, b->pos, b->last - b->pos);
}
- ngx_quic_free_bufs(pc, in);
+ ngx_quic_free_chain(pc, in);
if (qs->in == NULL) {
rev->ready = rev->pending_eof;
"quic stream id:0x%xL cleanup", qs->id);
ngx_rbtree_delete(&qc->streams.tree, &qs->node);
- ngx_quic_free_bufs(pc, qs->in);
- ngx_quic_free_bufs(pc, qs->out);
+ ngx_quic_free_chain(pc, qs->in);
+ ngx_quic_free_chain(pc, qs->out);
if (qc->closing) {
/* schedule handler call to continue ngx_quic_close_connection() */
}
if (f->offset < qs->recv_offset) {
- ngx_quic_trim_bufs(frame->data, qs->recv_offset - f->offset);
+ ngx_quic_trim_chain(frame->data, qs->recv_offset - f->offset);
f->offset = qs->recv_offset;
}