From 2f865b4bba1bedc96f17b696916d74c392c83e1b Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Sun, 2 Apr 2023 21:06:20 +0000 Subject: Prop#329 streams: Handle stream usage with conflux This adds utility functions to help stream block decisions, as well as cpath layer_hint checks for stream cell acceptance, and syncing stream lists for conflux circuits. These functions are then called throughout the codebase to properly manage conflux streams. --- src/core/or/connection_edge.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/or/connection_edge.c') diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index b0ccedc27f..ee6ab8596c 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -70,6 +70,7 @@ #include "core/or/circuitpadding.h" #include "core/or/connection_edge.h" #include "core/or/congestion_control_flow.h" +#include "core/or/conflux_util.h" #include "core/or/circuitstats.h" #include "core/or/connection_or.h" #include "core/or/extendinfo.h" @@ -628,6 +629,7 @@ connection_half_edge_add(const edge_connection_t *conn, if (!circ->half_streams) { circ->half_streams = smartlist_new(); + conflux_update_half_streams(circ, circ->half_streams); } half_conn->stream_id = conn->stream_id; @@ -3102,6 +3104,10 @@ get_unique_stream_id_by_circ(origin_circuit_t *circ) test_stream_id)) goto again; + if (TO_CIRCUIT(circ)->conflux) { + conflux_sync_circ_fields(TO_CIRCUIT(circ)->conflux, circ); + } + return test_stream_id; } -- cgit v1.2.3-54-g00ecf