diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2026-04-15 22:22:43 +0400 |
|---|---|---|
| committer | Sergey Kandaurov <s.kandaurov@f5.com> | 2026-04-16 15:25:55 +0400 |
| commit | ea72fa1d92af638e23def2da1790b9b0566bd23b (patch) | |
| tree | d508d07b31186ae0183156b98200ed4f38c8fb23 /src/event | |
| parent | 4dd7ec9ae48df272cef2a1ecd4de0a237783828a (diff) | |
| download | nginx-ea72fa1d92af638e23def2da1790b9b0566bd23b.tar.gz nginx-ea72fa1d92af638e23def2da1790b9b0566bd23b.tar.bz2 | |
QUIC: simplified ngx_quic_cbs_recv_rcd()
There's no need in for-loop, a single buffer is fed at a time.
Diffstat (limited to 'src/event')
| -rw-r--r-- | src/event/quic/ngx_event_quic_ssl.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/event/quic/ngx_event_quic_ssl.c b/src/event/quic/ngx_event_quic_ssl.c index 4e84f8102..705f39f6c 100644 --- a/src/event/quic/ngx_event_quic_ssl.c +++ b/src/event/quic/ngx_event_quic_ssl.c @@ -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) { - b = cl->buf; - - if (b->sync) { - /* hole */ + cl = ctx->crypto.chain; - *data = NULL; - *bytes_read = 0; + if (cl == NULL || cl->buf->sync) { + *data = NULL; + *bytes_read = 0; - break; - } + } else { + b = cl->buf; *data = b->pos; *bytes_read = b->last - b->pos; - - break; } - *data = NULL; - *bytes_read = 0; - return 1; } |
