mirror of
https://github.com/nginx/nginx.git
synced 2025-06-22 22:10:45 +08:00
Allow ngx_queue_frame() to insert frame in the front.
Previously a frame could only be inserted after the first element of the list.
This commit is contained in:
parent
ede2656c60
commit
9975b088bb
@ -1142,21 +1142,16 @@ ngx_quic_handle_stream_data_blocked_frame(ngx_connection_t *c,
|
|||||||
static void
|
static void
|
||||||
ngx_quic_queue_frame(ngx_quic_connection_t *qc, ngx_quic_frame_t *frame)
|
ngx_quic_queue_frame(ngx_quic_connection_t *qc, ngx_quic_frame_t *frame)
|
||||||
{
|
{
|
||||||
ngx_quic_frame_t *f;
|
ngx_quic_frame_t **f;
|
||||||
|
|
||||||
if (qc->frames == NULL) {
|
for (f = &qc->frames; *f; f = &(*f)->next) {
|
||||||
qc->frames = frame;
|
if ((*f)->level > frame->level) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (f = qc->frames; f->next; f = f->next) {
|
|
||||||
if (f->next->level > frame->level) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->next = f->next;
|
frame->next = *f;
|
||||||
f->next = frame;
|
*f = frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user