- /* Try to find matching "opening" ctx */
- opening_ctx_pool = quic_main.wrk_ctx[thread_index].opening_ctx_pool;
-
- /* *INDENT-OFF* */
- pool_foreach (ctx_index_ptr, opening_ctx_pool,
- ({
- ctx = quic_ctx_get (*ctx_index_ptr, thread_index);
- if (ctx->udp_session_handle == udp_session_handle)
- {
- /* Right ctx found, create conn & remove from pool */
- quic_accept_connection (*ctx_index_ptr, sa, salen, packet_ctx->packet);
- *max_packet = packet_n + 1;
- packet_ctx->thread_index = thread_index;
- packet_ctx->ctx_index = *ctx_index_ptr;
- pool_put (opening_ctx_pool, ctx_index_ptr);
- goto updateOffset;
- }
- }));
- /* *INDENT-ON* */
- QUIC_ERR ("Missing opening ctx (in %d) Thread %d UDP 0x%lx",
- pool_elts (opening_ctx_pool), thread_index,
- udp_session_handle);
+ udp_session = session_get_from_handle (udp_session_handle);
+ if ((rv = quic_accept_connection (udp_session->opaque, sa,
+ salen, packet_ctx->packet)))
+ {
+ QUIC_ERR ("quic accept errored with %d", rv);
+ }