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
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue