Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_streams.c @ 9012:489c2dcb3180 quic
QUIC: trim input chain in ngx_quic_buffer_write().
This allows to eliminate explicit trimming when handling input STREAM frame.
As a result, ngx_quic_trim_chain() is eliminated as well.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 14 Feb 2022 14:51:10 +0300 |
parents | f9c788f3f5cc |
children | c6580dce98a8 |
comparison
equal
deleted
inserted
replaced
9011:f9c788f3f5cc | 9012:489c2dcb3180 |
---|---|
1113 | 1113 |
1114 if (last < qs->recv_offset) { | 1114 if (last < qs->recv_offset) { |
1115 return NGX_OK; | 1115 return NGX_OK; |
1116 } | 1116 } |
1117 | 1117 |
1118 if (f->offset < qs->recv_offset) { | |
1119 ngx_quic_trim_chain(frame->data, qs->recv_offset - f->offset); | |
1120 f->offset = qs->recv_offset; | |
1121 } | |
1122 | |
1123 if (f->fin) { | 1118 if (f->fin) { |
1124 if (qs->recv_final_size != (uint64_t) -1 && qs->recv_final_size != last) | 1119 if (qs->recv_final_size != (uint64_t) -1 && qs->recv_final_size != last) |
1125 { | 1120 { |
1126 qc->error = NGX_QUIC_ERR_FINAL_SIZE_ERROR; | 1121 qc->error = NGX_QUIC_ERR_FINAL_SIZE_ERROR; |
1127 return NGX_ERROR; | 1122 return NGX_ERROR; |