]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Rename relay_msg_get_format to circuit_get_relay_format.
authorNick Mathewson <nickm@torproject.org>
Thu, 17 Apr 2025 23:37:15 +0000 (19:37 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 5 May 2025 17:07:37 +0000 (13:07 -0400)
src/core/or/relay.c
src/core/or/relay_msg.c
src/core/or/relay_msg.h

index 6965528ff12a08cfbb08f379a7582f27a1d96282..e174f339e171a19e6fe732a6320cb7d4306138d2 100644 (file)
@@ -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);
 
index f6f7a207b2c6d82200c1e4f4c09796e1508dbfbd..8abdc2182d25e81cf717049777080e41a3ad64a5 100644 (file)
@@ -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;
index 4943ab0090f05e0c91d45cba11f9958f29f07dff..0bc98f9f3c11d32c1c2d8a0cb06dd567d6a7d6ad 100644 (file)
@@ -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