mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 2.20.1
- [BUGFIX] Typo in new "validate peer addr by DCID" code. It is a benign bug (works either way), but better to fix it. - Simplify Stream Priority Iterator (SPI). - Minor documentation updates.
This commit is contained in:
parent
b1a7c3f944
commit
cd35ff02ed
10 changed files with 28 additions and 74 deletions
|
@ -62,23 +62,18 @@ test_same_priority (unsigned priority)
|
|||
new_stream(priority),
|
||||
};
|
||||
struct lsquic_streams_tailq streams;
|
||||
unsigned flags = 0xF00; /* Arbitrary value */
|
||||
lsquic_stream_t *stream;
|
||||
|
||||
TAILQ_INIT(&streams);
|
||||
TAILQ_INSERT_TAIL(&streams, stream_arr[0], next_write_stream);
|
||||
stream_arr[0]->sm_qflags |= flags;
|
||||
TAILQ_INSERT_TAIL(&streams, stream_arr[1], next_write_stream);
|
||||
stream_arr[1]->sm_qflags |= flags;
|
||||
TAILQ_INSERT_TAIL(&streams, stream_arr[2], next_write_stream);
|
||||
stream_arr[2]->sm_qflags |= flags;
|
||||
TAILQ_INSERT_TAIL(&streams, stream_arr[3], next_write_stream);
|
||||
stream_arr[3]->sm_qflags |= flags;
|
||||
|
||||
lsquic_spi_init(&spi, TAILQ_FIRST(&streams),
|
||||
TAILQ_LAST(&streams, lsquic_streams_tailq),
|
||||
(uintptr_t) &TAILQ_NEXT((lsquic_stream_t *) NULL, next_write_stream),
|
||||
flags, &lconn, __func__, NULL, NULL);
|
||||
&lconn, __func__, NULL, NULL);
|
||||
|
||||
stream = lsquic_spi_first(&spi);
|
||||
assert(stream == stream_arr[0]);
|
||||
|
@ -94,7 +89,7 @@ test_same_priority (unsigned priority)
|
|||
/* Test reinitialization: */
|
||||
lsquic_spi_init(&spi, stream_arr[0], stream_arr[1],
|
||||
(uintptr_t) &TAILQ_NEXT((lsquic_stream_t *) NULL, next_write_stream),
|
||||
flags, &lconn, __func__, NULL, NULL);
|
||||
&lconn, __func__, NULL, NULL);
|
||||
stream = lsquic_spi_first(&spi);
|
||||
assert(stream == stream_arr[0]);
|
||||
stream = lsquic_spi_next(&spi);
|
||||
|
@ -110,7 +105,6 @@ static void
|
|||
test_different_priorities (int *priority)
|
||||
{
|
||||
struct lsquic_streams_tailq streams;
|
||||
unsigned flags = 0xC000; /* Arbitrary value */
|
||||
lsquic_stream_t *stream;
|
||||
int prio, prev_prio, count, n_streams = 0;
|
||||
|
||||
|
@ -121,15 +115,13 @@ test_different_priorities (int *priority)
|
|||
assert(*priority < 256);
|
||||
stream = new_stream(*priority);
|
||||
TAILQ_INSERT_TAIL(&streams, stream, next_send_stream);
|
||||
stream->sm_qflags |= flags;
|
||||
++n_streams;
|
||||
}
|
||||
|
||||
lsquic_spi_init(&spi, TAILQ_FIRST(&streams),
|
||||
TAILQ_LAST(&streams, lsquic_streams_tailq),
|
||||
(uintptr_t) &TAILQ_NEXT((lsquic_stream_t *) NULL, next_send_stream),
|
||||
flags, &lconn, __func__, NULL, NULL);
|
||||
|
||||
&lconn, __func__, NULL, NULL);
|
||||
for (prev_prio = -1, count = 0, stream = lsquic_spi_first(&spi); stream;
|
||||
stream = lsquic_spi_next(&spi), ++count)
|
||||
{
|
||||
|
@ -222,7 +214,7 @@ test_drop (const struct drop_test *test)
|
|||
lsquic_spi_init(&spi, TAILQ_FIRST(&streams),
|
||||
TAILQ_LAST(&streams, lsquic_streams_tailq),
|
||||
(uintptr_t) &TAILQ_NEXT((lsquic_stream_t *) NULL, next_write_stream),
|
||||
SMQF_WRITE_Q_FLAGS, &lconn, __func__, NULL, NULL);
|
||||
&lconn, __func__, NULL, NULL);
|
||||
|
||||
if (drop_high)
|
||||
lsquic_spi_drop_high(&spi);
|
||||
|
@ -265,7 +257,6 @@ static void
|
|||
test_different_priorities_filter_odd (int *priority)
|
||||
{
|
||||
struct lsquic_streams_tailq streams;
|
||||
unsigned flags = 0xC000; /* Arbitrary value */
|
||||
lsquic_stream_t *stream;
|
||||
int prio, prev_prio, count, n_streams = 0;
|
||||
|
||||
|
@ -276,7 +267,6 @@ test_different_priorities_filter_odd (int *priority)
|
|||
assert(*priority < 256);
|
||||
stream = new_stream(*priority);
|
||||
TAILQ_INSERT_TAIL(&streams, stream, next_send_stream);
|
||||
stream->stream_flags |= flags;
|
||||
++n_streams;
|
||||
}
|
||||
|
||||
|
@ -285,7 +275,7 @@ test_different_priorities_filter_odd (int *priority)
|
|||
lsquic_spi_init(&spi, TAILQ_FIRST(&streams),
|
||||
TAILQ_LAST(&streams, lsquic_streams_tailq),
|
||||
(uintptr_t) &TAILQ_NEXT((lsquic_stream_t *) NULL, next_send_stream),
|
||||
flags, &lconn, __func__, filter_out_odd_priorities, &my_filter_ctx);
|
||||
&lconn, __func__, filter_out_odd_priorities, &my_filter_ctx);
|
||||
|
||||
for (prev_prio = -1, count = 0, stream = lsquic_spi_first(&spi); stream;
|
||||
stream = lsquic_spi_next(&spi), ++count)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue