Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_streams.c @ 8948:19e063e955bf quic
QUIC: renamed buffer-related functions.
ngx_quic_alloc_buf() -> ngx_quic_alloc_chain(),
ngx_quic_free_bufs() -> ngx_quic_free_chain(),
ngx_quic_trim_bufs() -> ngx_quic_trim_chain()
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 16 Dec 2021 17:06:35 +0300 |
parents | 6ccf3867959a |
children | d78972cf4bac |
comparison
equal
deleted
inserted
replaced
8947:6ccf3867959a | 8948:19e063e955bf |
---|---|
775 b = cl->buf; | 775 b = cl->buf; |
776 len += b->last - b->pos; | 776 len += b->last - b->pos; |
777 buf = ngx_cpymem(buf, b->pos, b->last - b->pos); | 777 buf = ngx_cpymem(buf, b->pos, b->last - b->pos); |
778 } | 778 } |
779 | 779 |
780 ngx_quic_free_bufs(pc, in); | 780 ngx_quic_free_chain(pc, in); |
781 | 781 |
782 if (qs->in == NULL) { | 782 if (qs->in == NULL) { |
783 rev->ready = rev->pending_eof; | 783 rev->ready = rev->pending_eof; |
784 } | 784 } |
785 | 785 |
973 | 973 |
974 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, | 974 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, |
975 "quic stream id:0x%xL cleanup", qs->id); | 975 "quic stream id:0x%xL cleanup", qs->id); |
976 | 976 |
977 ngx_rbtree_delete(&qc->streams.tree, &qs->node); | 977 ngx_rbtree_delete(&qc->streams.tree, &qs->node); |
978 ngx_quic_free_bufs(pc, qs->in); | 978 ngx_quic_free_chain(pc, qs->in); |
979 ngx_quic_free_bufs(pc, qs->out); | 979 ngx_quic_free_chain(pc, qs->out); |
980 | 980 |
981 if (qc->closing) { | 981 if (qc->closing) { |
982 /* schedule handler call to continue ngx_quic_close_connection() */ | 982 /* schedule handler call to continue ngx_quic_close_connection() */ |
983 ngx_post_event(pc->read, &ngx_posted_events); | 983 ngx_post_event(pc->read, &ngx_posted_events); |
984 return; | 984 return; |
1077 if (last <= qs->recv_offset) { | 1077 if (last <= qs->recv_offset) { |
1078 return NGX_OK; | 1078 return NGX_OK; |
1079 } | 1079 } |
1080 | 1080 |
1081 if (f->offset < qs->recv_offset) { | 1081 if (f->offset < qs->recv_offset) { |
1082 ngx_quic_trim_bufs(frame->data, qs->recv_offset - f->offset); | 1082 ngx_quic_trim_chain(frame->data, qs->recv_offset - f->offset); |
1083 f->offset = qs->recv_offset; | 1083 f->offset = qs->recv_offset; |
1084 } | 1084 } |
1085 | 1085 |
1086 if (f->fin) { | 1086 if (f->fin) { |
1087 if (qs->final_size != (uint64_t) -1 && qs->final_size != last) { | 1087 if (qs->final_size != (uint64_t) -1 && qs->final_size != last) { |