mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 2.4.6
- Minor code cleanup and logging improvements. - Server and client programs: include library version (e.g. 2.4.6) into `server' and `user-agent' headers.
This commit is contained in:
parent
7542f0f5aa
commit
ad08470cea
11 changed files with 55 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2019-10-11
|
||||
- 2.4.6
|
||||
- Minor code cleanup and logging improvements.
|
||||
- Server and client programs: include library version (e.g. 2.4.6)
|
||||
into `server' and `user-agent' headers.
|
||||
|
||||
2019-10-08
|
||||
- 2.4.5
|
||||
- [OPTIMIZATION]: flush encoder stream only when necessary.
|
||||
|
|
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
|
||||
#define LSQUIC_MAJOR_VERSION 2
|
||||
#define LSQUIC_MINOR_VERSION 4
|
||||
#define LSQUIC_PATCH_VERSION 5
|
||||
#define LSQUIC_PATCH_VERSION 6
|
||||
|
||||
/**
|
||||
* Engine flags:
|
||||
|
|
|
@ -252,6 +252,7 @@ attq_count_before (struct attq *q, lsquic_time_t cutoff)
|
|||
return total_count;
|
||||
}
|
||||
assert(0);
|
||||
return total_count;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4211,19 +4211,32 @@ full_conn_ci_is_tickable (lsquic_conn_t *lconn)
|
|||
struct lsquic_stream *stream;
|
||||
|
||||
if (!TAILQ_EMPTY(&conn->fc_pub.service_streams))
|
||||
{
|
||||
LSQ_DEBUG("tickable: there are streams to be serviced");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((conn->fc_enpub->enp_flags & ENPUB_CAN_SEND)
|
||||
&& (should_generate_ack(conn) ||
|
||||
!lsquic_send_ctl_sched_is_blocked(&conn->fc_send_ctl)))
|
||||
{
|
||||
if (conn->fc_flags & (FC_SEND_GOAWAY|FC_SEND_STOP_WAITING
|
||||
|FC_SEND_PING|FC_SEND_WUF|FC_CLOSING))
|
||||
const enum full_conn_flags send_flags = FC_SEND_GOAWAY
|
||||
|FC_SEND_STOP_WAITING|FC_SEND_PING|FC_SEND_WUF|FC_CLOSING;
|
||||
if (conn->fc_flags & send_flags)
|
||||
{
|
||||
LSQ_DEBUG("tickable: flags: 0x%X", conn->fc_flags & send_flags);
|
||||
goto check_can_send;
|
||||
}
|
||||
if (lsquic_send_ctl_has_buffered(&conn->fc_send_ctl))
|
||||
{
|
||||
LSQ_DEBUG("tickable: has buffered packets");
|
||||
goto check_can_send;
|
||||
}
|
||||
if (!TAILQ_EMPTY(&conn->fc_pub.sending_streams))
|
||||
{
|
||||
LSQ_DEBUG("tickable: there are sending streams");
|
||||
goto check_can_send;
|
||||
}
|
||||
if ((conn->fc_conn.cn_flags & LSCONN_HANDSHAKE_DONE) ||
|
||||
conn->fc_conn.cn_esf_c->esf_is_zero_rtt_enabled(
|
||||
conn->fc_conn.cn_enc_session))
|
||||
|
@ -4231,7 +4244,11 @@ full_conn_ci_is_tickable (lsquic_conn_t *lconn)
|
|||
TAILQ_FOREACH(stream, &conn->fc_pub.write_streams,
|
||||
next_write_stream)
|
||||
if (lsquic_stream_write_avail(stream))
|
||||
{
|
||||
LSQ_DEBUG("tickable: stream %"PRIu64" can be written to",
|
||||
stream->id);
|
||||
goto check_can_send;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4239,7 +4256,11 @@ full_conn_ci_is_tickable (lsquic_conn_t *lconn)
|
|||
next_write_stream)
|
||||
if (LSQUIC_GQUIC_STREAM_HANDSHAKE == stream->id
|
||||
&& lsquic_stream_write_avail(stream))
|
||||
{
|
||||
LSQ_DEBUG("tickable: stream %"PRIu64" can be written to",
|
||||
stream->id);
|
||||
goto check_can_send;
|
||||
}
|
||||
}
|
||||
goto check_readable_streams;
|
||||
check_can_send:
|
||||
|
@ -4250,8 +4271,13 @@ full_conn_ci_is_tickable (lsquic_conn_t *lconn)
|
|||
check_readable_streams:
|
||||
TAILQ_FOREACH(stream, &conn->fc_pub.read_streams, next_read_stream)
|
||||
if (lsquic_stream_readable(stream))
|
||||
{
|
||||
LSQ_DEBUG("tickable: stream %"PRIu64" can be read from",
|
||||
stream->id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
LSQ_DEBUG("not tickable");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1213,8 +1213,6 @@ lsquic_ietf_full_conn_server_new (struct lsquic_engine_public *enpub,
|
|||
= imc->imc_largest_recvd[pns];
|
||||
}
|
||||
|
||||
/* TODO: Transfer incoming packets. */
|
||||
|
||||
/* Mini connection sends out packets 0, 1, 2... and so on. It deletes
|
||||
* packets that have been successfully sent and acked or those that have
|
||||
* been lost. We take ownership of all packets in mc_packets_out; those
|
||||
|
|
|
@ -205,6 +205,10 @@ enum stream_history_event
|
|||
SHE_CLOSE = 'X',
|
||||
SHE_DELAY_SW = 'y',
|
||||
SHE_FORCE_FINISH = 'Z',
|
||||
SHE_WANTREAD_NO = '0', /* "YES" must be one more than "NO" */
|
||||
SHE_WANTREAD_YES = '1',
|
||||
SHE_WANTWRITE_NO = '2',
|
||||
SHE_WANTWRITE_YES = '3',
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -1741,6 +1745,7 @@ stream_wantwrite (struct lsquic_stream *stream, int new_val)
|
|||
int
|
||||
lsquic_stream_wantread (lsquic_stream_t *stream, int is_want)
|
||||
{
|
||||
SM_HISTORY_APPEND(stream, SHE_WANTREAD_NO + !!is_want);
|
||||
if (!(stream->stream_flags & STREAM_U_READ_DONE))
|
||||
{
|
||||
if (is_want)
|
||||
|
@ -1762,6 +1767,7 @@ lsquic_stream_wantwrite (lsquic_stream_t *stream, int is_want)
|
|||
|
||||
is_want = !!is_want;
|
||||
|
||||
SM_HISTORY_APPEND(stream, SHE_WANTWRITE_NO + is_want);
|
||||
if (0 == (stream->stream_flags & STREAM_U_WRITE_DONE)
|
||||
&& SSHS_BEGIN == stream->sm_send_headers_state)
|
||||
{
|
||||
|
|
|
@ -54,7 +54,6 @@ lsquic_varint_read (const unsigned char *p, const unsigned char *end,
|
|||
*valp = val;
|
||||
return 8;
|
||||
}
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1533,6 +1533,7 @@ main (int argc, char **argv)
|
|||
#if LSQUIC_CONN_STATS
|
||||
prog.prog_api.ea_stats_fh = stats_fh;
|
||||
#endif
|
||||
prog.prog_settings.es_ua = LITESPEED_ID;
|
||||
|
||||
if (client_ctx.qif_file)
|
||||
{
|
||||
|
|
|
@ -954,7 +954,7 @@ send_headers2 (struct lsquic_stream *stream, struct lsquic_stream_ctx *st_h,
|
|||
},
|
||||
{
|
||||
.name = { .iov_base = "server", .iov_len = 6, },
|
||||
.value = { .iov_base = "LiteSpeed", .iov_len = 9, },
|
||||
.value = { .iov_base = LITESPEED_ID, .iov_len = sizeof(LITESPEED_ID) - 1, },
|
||||
},
|
||||
{
|
||||
.name = { .iov_base = "content-type", .iov_len = 12, },
|
||||
|
|
|
@ -120,4 +120,9 @@ create_lsquic_reader_ctx (const char *filename);
|
|||
void
|
||||
destroy_lsquic_reader_ctx (struct reader_ctx *ctx);
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
#define LITESPEED_ID "lsquic" "/" TOSTRING(LSQUIC_MAJOR_VERSION) "." \
|
||||
TOSTRING(LSQUIC_MINOR_VERSION) "." TOSTRING(LSQUIC_PATCH_VERSION)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -79,6 +79,12 @@ test_attq_ordering (enum sort_action sa)
|
|||
|
||||
q = attq_create();
|
||||
|
||||
for (i = 0; i < sizeof(curiosity); ++i)
|
||||
{
|
||||
unsigned count_before = attq_count_before(q, curiosity[i]);
|
||||
assert(count_before == 0);
|
||||
}
|
||||
|
||||
conns = calloc(sizeof(curiosity), sizeof(conns[0]));
|
||||
for (i = 0; i < sizeof(curiosity); ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue