From: Nick Mathewson Date: Thu, 17 Apr 2025 23:37:15 +0000 (-0400) Subject: Rename relay_msg_get_format to circuit_get_relay_format. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d2a4ac27a90415e16fdd4f7053033b7d7bcebc9;p=thirdparty%2Ftor.git Rename relay_msg_get_format to circuit_get_relay_format. --- diff --git a/src/core/or/relay.c b/src/core/or/relay.c index 6965528ff1..e174f339e1 100644 --- a/src/core/or/relay.c +++ b/src/core/or/relay.c @@ -259,7 +259,7 @@ circuit_receive_relay_cell(cell_t *cell, circuit_t *circ, if (recognized) { edge_connection_t *conn = NULL; - relay_cell_fmt_t format = relay_msg_get_format(circ, layer_hint); + relay_cell_fmt_t format = circuit_get_relay_format(circ, layer_hint); /* Recognized cell, the cell digest has been updated, we'll record it for * the SENDME if need be. */ @@ -621,7 +621,7 @@ relay_send_command_from_edge_,(streamid_t stream_id, circuit_t *orig_circ, size_t msg_body_len; { - relay_cell_fmt_t cell_format = relay_msg_get_format(circ, cpath_layer); + relay_cell_fmt_t cell_format = circuit_get_relay_format(circ, cpath_layer); relay_msg_t msg; if (payload_len > relay_cell_max_payload_size(cell_format, relay_command)) { @@ -2231,7 +2231,7 @@ connection_edge_get_inbuf_bytes_to_package(size_t n_available, (on_circuit->send_randomness_after_n_cells == 0) && (! on_circuit->have_sent_sufficiently_random_cell); - relay_cell_fmt_t cell_format = relay_msg_get_format(on_circuit, cpath); + relay_cell_fmt_t cell_format = circuit_get_relay_format(on_circuit, cpath); size_t target_length = relay_cell_max_payload_size(cell_format, RELAY_COMMAND_DATA); diff --git a/src/core/or/relay_msg.c b/src/core/or/relay_msg.c index f6f7a207b2..8abdc2182d 100644 --- a/src/core/or/relay_msg.c +++ b/src/core/or/relay_msg.c @@ -287,9 +287,8 @@ relay_msg_decode_cell(relay_cell_fmt_t format, /** Return the format to use. * * NULL can be passed but not for both. */ -/* TODO #41051: Rename this. */ relay_cell_fmt_t -relay_msg_get_format(const circuit_t *circ, const crypt_path_t *cpath) +circuit_get_relay_format(const circuit_t *circ, const crypt_path_t *cpath) { if (circ && CIRCUIT_IS_ORCIRC(circ)) { return CONST_TO_OR_CIRCUIT(circ)->relay_cell_format; diff --git a/src/core/or/relay_msg.h b/src/core/or/relay_msg.h index 4943ab0090..0bc98f9f3c 100644 --- a/src/core/or/relay_msg.h +++ b/src/core/or/relay_msg.h @@ -32,8 +32,8 @@ relay_msg_t *relay_msg_decode_cell( FREE_AND_NULL(relay_msg_t, relay_msg_free_, (msg)) /* Getters */ -relay_cell_fmt_t relay_msg_get_format(const circuit_t *circ, - const crypt_path_t *cpath); +relay_cell_fmt_t circuit_get_relay_format(const circuit_t *circ, + const crypt_path_t *cpath); /* * NOTE: The following are inlined for performance reasons. These values are