mirror of
https://github.com/nginx/nginx.git
synced 2026-09-03 20:53:04 -05:00
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:
committed by
Sergey Kandaurov
parent
4dd7ec9ae4
commit
ea72fa1d92
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user