ソースを参照

prop289: Rename packaged functions with better name

The circuit and stream level functions that update the package window have
been renamed to have a "_note_" in them to make their purpose more clear.

Part of #26288

Signed-off-by: David Goulet <dgoulet@torproject.org>
David Goulet 7 年 前
コミット
217b553193
3 ファイル変更7 行追加6 行削除
  1. 2 2
      src/core/or/relay.c
  2. 2 2
      src/core/or/sendme.c
  3. 3 2
      src/core/or/sendme.h

+ 2 - 2
src/core/or/relay.c

@@ -2092,7 +2092,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial,
   }
 
   /* Handle the circuit-level SENDME package window. */
-  if (sendme_circuit_data_packaged(circ, cpath_layer) < 0) {
+  if (sendme_note_circuit_data_packaged(circ, cpath_layer) < 0) {
     /* Package window has gone under 0. Protocol issue. */
     log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
            "Circuit package window is below 0. Closing circuit.");
@@ -2101,7 +2101,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial,
   }
 
   /* Handle the stream-level SENDME package window. */
-  if (sendme_stream_data_packaged(conn) < 0) {
+  if (sendme_note_stream_data_packaged(conn) < 0) {
     connection_stop_reading(TO_CONN(conn));
     log_debug(domain,"conn->package_window reached 0.");
     circuit_consider_stop_edge_reading(circ, cpath_layer);

+ 2 - 2
src/core/or/sendme.c

@@ -491,7 +491,7 @@ sendme_stream_data_received(edge_connection_t *conn)
  * layer_hint is NULL, this means we are the Exit end point else we are the
  * Client. Update the package window and return its new value. */
 int
-sendme_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint)
+sendme_note_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint)
 {
   int package_window, domain;
 
@@ -518,7 +518,7 @@ sendme_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint)
 /* Called when a relay DATA cell is packaged for the given edge connection
  * conn. Update the package window and return its new value. */
 int
-sendme_stream_data_packaged(edge_connection_t *conn)
+sendme_note_stream_data_packaged(edge_connection_t *conn)
 {
   tor_assert(conn);
   return --conn->package_window;

+ 3 - 2
src/core/or/sendme.h

@@ -30,8 +30,9 @@ int sendme_stream_data_received(edge_connection_t *conn);
 int sendme_circuit_data_received(circuit_t *circ, crypt_path_t *layer_hint);
 
 /* Update package window functions. */
-int sendme_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint);
-int sendme_stream_data_packaged(edge_connection_t *conn);
+int sendme_note_circuit_data_packaged(circuit_t *circ,
+                                      crypt_path_t *layer_hint);
+int sendme_note_stream_data_packaged(edge_connection_t *conn);
 
 /* Track cell digest. */
 void sendme_note_cell_digest(circuit_t *circ);