aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMathiasRaoul <mathias.raoul@gmail.com>2019-11-27 14:44:57 +0000
committerDave Wallace <dwallacelf@gmail.com>2019-12-10 14:44:44 +0000
commit05d7312ebe35f66db920b465a70a34fed089a458 (patch)
tree7f040a51a283a033dc347079e4de5c34cf24e33e /src/plugins
parent684fb6e930a278385993504ba28c497d56bcb05e (diff)
quic: removing quicly_send call from quic_accept_connection
Type: fix Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com> Change-Id: I429b50b88c8e029b06854c7433d0bc77619e98a3
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/quic/quic.c30
1 files changed, 21 insertions, 9 deletions
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);
}