Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic.c @ 8745:0b94e2df6389 quic
QUIC: fixed ngx_quic_send_ack_range() function.
Created frame was not added to the output queue.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 07 Apr 2021 13:09:26 +0300 |
parents | fa24745b8c06 |
children | 0c628de2e2b7 |
comparison
equal
deleted
inserted
replaced
8744:fa24745b8c06 | 8745:0b94e2df6389 |
---|---|
3040 | 3040 |
3041 static ngx_int_t | 3041 static ngx_int_t |
3042 ngx_quic_send_ack_range(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, | 3042 ngx_quic_send_ack_range(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx, |
3043 uint64_t smallest, uint64_t largest) | 3043 uint64_t smallest, uint64_t largest) |
3044 { | 3044 { |
3045 ngx_quic_frame_t *frame; | 3045 ngx_quic_frame_t *frame; |
3046 ngx_quic_connection_t *qc; | |
3047 | |
3048 qc = ngx_quic_get_connection(c); | |
3046 | 3049 |
3047 frame = ngx_quic_alloc_frame(c); | 3050 frame = ngx_quic_alloc_frame(c); |
3048 if (frame == NULL) { | 3051 if (frame == NULL) { |
3049 return NGX_ERROR; | 3052 return NGX_ERROR; |
3050 } | 3053 } |
3053 frame->type = NGX_QUIC_FT_ACK; | 3056 frame->type = NGX_QUIC_FT_ACK; |
3054 frame->u.ack.largest = largest; | 3057 frame->u.ack.largest = largest; |
3055 frame->u.ack.delay = 0; | 3058 frame->u.ack.delay = 0; |
3056 frame->u.ack.range_count = 0; | 3059 frame->u.ack.range_count = 0; |
3057 frame->u.ack.first_range = largest - smallest; | 3060 frame->u.ack.first_range = largest - smallest; |
3061 | |
3062 ngx_quic_queue_frame(qc, frame); | |
3058 | 3063 |
3059 return NGX_OK; | 3064 return NGX_OK; |
3060 } | 3065 } |
3061 | 3066 |
3062 | 3067 |