mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Fix: deactivate only *recent* HQ frame, not any HQ frame
This commit is contained in:
parent
75f54c8c52
commit
a1630d9c4f
1 changed files with 9 additions and 1 deletions
|
@ -2629,13 +2629,17 @@ frame_hq_gen_read (void *ctx, void *begin_buf, size_t len, int *fin)
|
||||||
struct stream_hq_frame *shf;
|
struct stream_hq_frame *shf;
|
||||||
size_t nw, frame_sz, avail, rem;
|
size_t nw, frame_sz, avail, rem;
|
||||||
unsigned bits;
|
unsigned bits;
|
||||||
|
int new;
|
||||||
|
|
||||||
while (p < end)
|
while (p < end)
|
||||||
{
|
{
|
||||||
shf = find_cur_hq_frame(stream);
|
shf = find_cur_hq_frame(stream);
|
||||||
if (shf)
|
if (shf)
|
||||||
|
{
|
||||||
|
new = 0;
|
||||||
LSQ_DEBUG("found current HQ frame of type 0x%X at offset %"PRIu64,
|
LSQ_DEBUG("found current HQ frame of type 0x%X at offset %"PRIu64,
|
||||||
shf->shf_frame_type, shf->shf_off);
|
shf->shf_frame_type, shf->shf_off);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rem = frame_std_gen_size(ctx);
|
rem = frame_std_gen_size(ctx);
|
||||||
|
@ -2646,7 +2650,10 @@ frame_hq_gen_read (void *ctx, void *begin_buf, size_t len, int *fin)
|
||||||
shf = stream_activate_hq_frame(stream,
|
shf = stream_activate_hq_frame(stream,
|
||||||
stream->sm_payload, HQFT_DATA, 0, rem);
|
stream->sm_payload, HQFT_DATA, 0, rem);
|
||||||
if (shf)
|
if (shf)
|
||||||
|
{
|
||||||
|
new = 1;
|
||||||
goto insert;
|
goto insert;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* TODO: abort connection? Handle failure somehow */
|
/* TODO: abort connection? Handle failure somehow */
|
||||||
|
@ -2663,6 +2670,7 @@ frame_hq_gen_read (void *ctx, void *begin_buf, size_t len, int *fin)
|
||||||
frame_sz = stream_hq_frame_size(shf);
|
frame_sz = stream_hq_frame_size(shf);
|
||||||
if (frame_sz > (uintptr_t) (end - p))
|
if (frame_sz > (uintptr_t) (end - p))
|
||||||
{
|
{
|
||||||
|
if (new)
|
||||||
stream_hq_frame_put(stream, shf);
|
stream_hq_frame_put(stream, shf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue