QUIC: simplified ngx_quic_cbs_recv_rcd()

There's no need in for-loop, a single buffer is fed at a time.
This commit is contained in:
Sergey Kandaurov 2026-04-15 22:22:43 +04:00 committed by Sergey Kandaurov
parent 4dd7ec9ae4
commit ea72fa1d92

View file

@ -152,27 +152,19 @@ ngx_quic_cbs_recv_rcd(ngx_ssl_conn_t *ssl_conn,
qc = ngx_quic_get_connection(c);
ctx = ngx_quic_get_send_ctx(qc, qc->read_level);
for (cl = ctx->crypto.chain; cl; cl = cl->next) {
cl = ctx->crypto.chain;
if (cl == NULL || cl->buf->sync) {
*data = NULL;
*bytes_read = 0;
} else {
b = cl->buf;
if (b->sync) {
/* hole */
*data = NULL;
*bytes_read = 0;
break;
}
*data = b->pos;
*bytes_read = b->last - b->pos;
break;
}
*data = NULL;
*bytes_read = 0;
return 1;
}