From 05d7312ebe35f66db920b465a70a34fed089a458 Mon Sep 17 00:00:00 2001 From: MathiasRaoul Date: Wed, 27 Nov 2019 14:44:57 +0000 Subject: quic: removing quicly_send call from quic_accept_connection Type: fix Signed-off-by: MathiasRaoul Change-Id: I429b50b88c8e029b06854c7433d0bc77619e98a3 --- src/plugins/quic/quic.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'src/plugins/quic') diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c index f51881e508a..54a2d9019ba 100644 --- a/src/plugins/quic/quic.c +++ b/src/plugins/quic/quic.c @@ -1854,9 +1854,12 @@ quic_accept_connection (u32 ctx_index, quic_rx_packet_ctx_t * pctx) quic_proto_on_close (ctx_index, thread_index); return rv; } - ctx->conn_state = QUIC_CONN_STATE_HANDSHAKE; - return quic_send_packets (ctx); + ctx->conn_state = QUIC_CONN_STATE_READY; + pctx->ctx_index = ctx_index; + pctx->thread_index = thread_index; + + return 0; } static int @@ -2039,13 +2042,22 @@ rx_start: } for (i = 0; i < max_packets; i++) { - if (packets_ctx[i].ptype != QUIC_PACKET_TYPE_RECEIVE) - continue; - ctx = quic_ctx_get (packets_ctx[i].ctx_index, - packets_ctx[i].thread_index); - quic_check_quic_session_connected (ctx); - ctx = quic_ctx_get (packets_ctx[i].ctx_index, - packets_ctx[i].thread_index); + switch (packets_ctx[i].ptype) + { + case QUIC_PACKET_TYPE_RECEIVE: + ctx = quic_ctx_get (packets_ctx[i].ctx_index, + packets_ctx[i].thread_index); + quic_check_quic_session_connected (ctx); + ctx = quic_ctx_get (packets_ctx[i].ctx_index, + packets_ctx[i].thread_index); + break; + case QUIC_PACKET_TYPE_ACCEPT: + ctx = quic_ctx_get (packets_ctx[i].ctx_index, + packets_ctx[i].thread_index); + break; + default: + continue; + } quic_send_packets (ctx); } -- cgit 1.2.3-korg