mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 14:58:20 +00: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:
parent
4dd7ec9ae4
commit
ea72fa1d92
1 changed files with 7 additions and 15 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue